/* ===========================================================================
   Xcelo VMS / ATS — design system
   Craft notes: transform/opacity-only motion, custom ease-out curves,
   press feedback on all controls, ease-out entrances, reduced-motion aware.
   =========================================================================== */
/* Palette taken from xcelogroup.com: deep navy #253559 with the gold #f6b129
   that carries the brand. Navy leads for structure and authority; gold is
   reserved for the one thing that matters on a screen, never for chrome. */
:root{
  --bg:#f6f7f9;
  --surface:#ffffff;
  --surface-2:#fafbfc;
  --ink:#151b2b;
  --ink-soft:#3a445c;
  --muted:#6a7488;
  --muted-2:#98a1b3;
  --line:#e6e9ef;
  --line-2:#eef0f5;

  /* brand */
  --brand:#253559;            /* navy — primary actions, active nav */
  --brand-ink:#1a2742;        /* pressed / hover */
  --brand-wash:#eef1f7;       /* tinted surfaces */
  --gold:#f6b129;             /* accent — scores, highlights, focus */
  --gold-ink:#8a5f05;
  --gold-wash:#fef6e6;

  --ok:#0f7a52; --ok-wash:#e6f4ee;
  --warn:#b4780f; --warn-wash:#fdf4e3;
  --danger:#c22f2f; --danger-wash:#fceded;
  --info:#1d5fb0; --info-wash:#e9f1fa;

  --radius:12px; --radius-sm:9px; --radius-lg:16px;
  --shadow-xs:0 1px 2px rgba(21,27,43,.05);
  --shadow-sm:0 1px 3px rgba(21,27,43,.07),0 1px 2px rgba(21,27,43,.04);
  --shadow-md:0 6px 20px -6px rgba(21,27,43,.14),0 2px 6px -2px rgba(21,27,43,.06);
  --shadow-pop:0 18px 44px -12px rgba(21,27,43,.24);

  --sidebar:250px;
  --ease-out:cubic-bezier(0.23,1,0.32,1);
  --ease-in-out:cubic-bezier(0.77,0,0.175,1);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  font-family:"IBM Plex Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  background:var(--bg);color:var(--ink);
  font-size:14px;line-height:1.55;letter-spacing:-.006em;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
a{color:var(--brand);text-decoration:none}
a:hover{color:var(--brand-ink)}
h1,h2,h3{margin:0;font-weight:640;letter-spacing:-.02em;color:var(--ink)}
h1{font-size:1.4rem}h2{font-size:1.05rem}h3{font-size:.95rem}
p{margin:.4rem 0}

/* ---------- app shell: sidebar + content ---------- */
.app{display:grid;grid-template-columns:var(--sidebar) 1fr;min-height:100vh}

.sidebar{
  position:sticky;top:0;height:100vh;
  background:var(--surface);border-right:1px solid var(--line);
  display:flex;flex-direction:column;padding:1.1rem .8rem;gap:.25rem;
}
.sidebar .brand{
  display:flex;align-items:center;gap:.6rem;padding:.35rem .55rem 1rem;
  font-weight:750;font-size:1.15rem;letter-spacing:-.03em;color:var(--ink);
}
.sidebar .brand .mark{
  width:30px;height:30px;border-radius:9px;flex:none;
  background:linear-gradient(140deg,#2f4470,var(--brand));color:#fff;
  display:grid;place-items:center;font-size:.85rem;font-weight:800;
  box-shadow:0 4px 12px -3px rgba(37,53,89,.45);
}
.sidebar .brand span{color:var(--brand)}
.navgroup{font-size:.66rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted-2);
  padding:.9rem .6rem .3rem;font-weight:650}
.navlink{
  display:flex;align-items:center;gap:.65rem;
  padding:.55rem .6rem;border-radius:var(--radius-sm);
  color:var(--muted);font-weight:550;font-size:.9rem;
  transition:background 150ms var(--ease-out),color 150ms var(--ease-out),transform 120ms var(--ease-out);
}
.navlink svg{width:18px;height:18px;flex:none;opacity:.85}
.navlink:hover{background:var(--surface-2);color:var(--ink)}
.navlink:active{transform:scale(.985)}
.navlink.active{background:var(--brand);color:#fff;font-weight:650}
.navlink.active svg{opacity:1}
.sidebar .spacer{flex:1}
.userchip{
  display:flex;align-items:center;gap:.6rem;padding:.55rem .6rem;border-radius:var(--radius-sm);
  border:1px solid var(--line);background:var(--surface-2);
}
.userchip .av{width:32px;height:32px;border-radius:50%;flex:none;color:#fff;font-weight:700;font-size:.8rem;
  display:grid;place-items:center;background:linear-gradient(140deg,#2f4470,#4a6099)}
.userchip .meta{min-width:0;flex:1}
.userchip .nm{font-size:.82rem;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.userchip .rl{font-size:.68rem;color:var(--muted-2);text-transform:uppercase;letter-spacing:.05em}
.iconbtn{width:30px;height:30px;border-radius:8px;border:1px solid var(--line);background:var(--surface);
  display:grid;place-items:center;color:var(--muted);cursor:pointer;flex:none;
  transition:transform 140ms var(--ease-out),background 140ms var(--ease-out),color 140ms var(--ease-out)}
.iconbtn:hover{background:var(--bg);color:var(--danger)}
.iconbtn:active{transform:scale(.94)}

.content{min-width:0;display:flex;flex-direction:column}
.content-inner{max-width:1200px;width:100%;margin:0 auto;padding:1.6rem 2rem 3rem}
.sitefoot{color:var(--muted-2);font-size:.78rem;padding:0 2rem 1.6rem;max-width:1200px;margin:0 auto;width:100%}

@media(max-width:900px){
  .app{grid-template-columns:1fr}
  .sidebar{position:static;height:auto;flex-direction:row;flex-wrap:wrap;align-items:center;
    padding:.7rem 1rem;gap:.4rem;overflow-x:auto}
  .sidebar .brand{padding:.2rem .4rem;width:auto}
  .navgroup{display:none}
  .navlink{padding:.45rem .6rem}.navlink span{display:none}
  .sidebar .spacer{flex:1}
  .content-inner{padding:1.2rem 1.1rem 2.5rem}
}

/* ---------- page header ---------- */
.pagehead{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;flex-wrap:wrap;margin-bottom:1.4rem}
.pagehead .sub{color:var(--muted);font-size:.9rem;margin-top:.25rem}
.breadcrumb{font-size:.8rem;color:var(--muted-2);margin-bottom:.35rem}
.breadcrumb a{color:var(--muted)}

/* ---------- KPI cards ---------- */
.kpis{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin-bottom:1.5rem}
.kpi{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:1.05rem 1.15rem;box-shadow:var(--shadow-xs);position:relative;overflow:hidden;
  transition:transform 200ms var(--ease-out),box-shadow 200ms var(--ease-out);
}
.kpi:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}
.kpi .l{color:var(--muted);font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;font-weight:600;display:flex;align-items:center;gap:.4rem}
.kpi .l .dot{width:8px;height:8px;border-radius:50%;background:var(--brand)}
.kpi .n{font-size:2.05rem;font-weight:720;letter-spacing:-.03em;margin-top:.35rem;line-height:1}
.kpi .hint{font-size:.76rem;color:var(--muted-2);margin-top:.35rem}
.kpi.k-open .l .dot{background:var(--brand)}
.kpi.k-sub .l .dot{background:var(--ok)}
.kpi.k-today .l .dot{background:var(--warn)}
.kpi.k-placed .l .dot{background:var(--info)}

/* ---------- cards ---------- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow-xs);margin-bottom:1.25rem;overflow:hidden}
.card>.card-h{display:flex;justify-content:space-between;align-items:center;gap:1rem;
  padding:.95rem 1.15rem;border-bottom:1px solid var(--line-2)}
.card>.card-h h2{font-size:.98rem}
.card>.card-b{padding:1.05rem 1.15rem}
.card>.card-b.flush{padding:0}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem}
@media(max-width:820px){.grid2{grid-template-columns:1fr}}

/* ---------- tables ---------- */
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:.875rem}
th,td{text-align:left;padding:.7rem .9rem;border-bottom:1px solid var(--line-2);vertical-align:middle}
thead th{font-size:.68rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:650;
  background:var(--surface-2);position:sticky;top:0}
tbody tr{transition:background 120ms var(--ease-out)}
tbody tr:hover{background:var(--surface-2)}
tbody tr:last-child td{border-bottom:none}
td .sub{color:var(--muted-2);font-size:.78rem}
.t-strong{font-weight:600;color:var(--ink)}
.num{font-variant-numeric:tabular-nums}

/* ---------- badges ---------- */
.badge{display:inline-flex;align-items:center;gap:.35rem;padding:.2rem .55rem;border-radius:999px;
  font-size:.72rem;font-weight:650;white-space:nowrap;line-height:1.4}
.badge::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.9}
.badge-open{background:var(--brand-wash);color:var(--brand-ink)}
.badge-filled{background:var(--ok-wash);color:var(--ok)}
.badge-closed{background:var(--danger-wash);color:var(--danger)}
.badge-hold{background:var(--warn-wash);color:var(--warn)}
.badge-info{background:var(--info-wash);color:var(--info)}
.badge-default{background:#eef1f6;color:var(--muted)}
.prio-high{color:var(--danger);font-weight:650}
.prio-medium{color:var(--warn);font-weight:600}
.prio-low{color:var(--muted-2)}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.45rem;
  background:var(--brand);color:#fff;border:1px solid var(--brand);
  padding:.55rem .95rem;border-radius:var(--radius-sm);font-weight:600;font-size:.88rem;
  cursor:pointer;white-space:nowrap;box-shadow:var(--shadow-xs);
  transition:transform 140ms var(--ease-out),background 140ms var(--ease-out),box-shadow 140ms var(--ease-out);
}
.btn svg{width:16px;height:16px}
.btn:hover{background:var(--brand-ink);border-color:var(--brand-ink);color:#fff;box-shadow:var(--shadow-sm)}
.btn:active{transform:scale(.97)}
.btn:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(246,177,41,.45)}
.btn-sm{padding:.35rem .65rem;font-size:.8rem}
.btn-ghost{background:var(--surface);color:var(--ink-soft);border-color:var(--line)}
.btn-ghost:hover{background:var(--surface-2);color:var(--ink);border-color:var(--muted-2)}
.btn-danger{background:var(--danger);border-color:var(--danger)}
.btn-danger:hover{background:#b91c1c;border-color:#b91c1c}
.btn-block{width:100%}
.actions{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}
.link-danger{color:var(--danger)}

/* ---------- forms ---------- */
.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:1rem 1.15rem}
@media(max-width:700px){.formgrid{grid-template-columns:1fr}}
.formgrid .full{grid-column:1/-1}
.row{margin-bottom:1rem}
label{display:block;font-size:.78rem;font-weight:600;color:var(--ink-soft);margin-bottom:.35rem}
input,select,textarea{
  width:100%;padding:.58rem .7rem;border:1px solid var(--line);border-radius:var(--radius-sm);
  font:inherit;font-size:.9rem;background:var(--surface);color:var(--ink);
  transition:border-color 140ms var(--ease-out),box-shadow 140ms var(--ease-out);
}
input::placeholder,textarea::placeholder{color:var(--muted-2)}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--gold);box-shadow:0 0 0 3px rgba(246,177,41,.22)}
textarea{min-height:96px;resize:vertical}
.req::after{content:" *";color:var(--danger)}
.hint{font-size:.75rem;color:var(--muted-2);margin-top:.3rem}
.checks{display:flex;flex-wrap:wrap;gap:.5rem}
.checks label{display:flex;align-items:center;gap:.45rem;font-weight:500;color:var(--ink);
  background:var(--surface-2);border:1px solid var(--line);padding:.4rem .7rem;border-radius:999px;margin:0;cursor:pointer;
  transition:border-color 140ms var(--ease-out),background 140ms var(--ease-out)}
.checks label:hover{border-color:var(--muted-2)}
.checks input{width:auto;margin:0}
.checks input:checked+span{color:var(--brand-ink);font-weight:600}
.formfoot{display:flex;gap:.6rem;justify-content:flex-end;margin-top:1.3rem;padding-top:1.1rem;border-top:1px solid var(--line-2)}

/* ---------- form section headings ---------- */
.secthead{
  font-size:.74rem;text-transform:uppercase;letter-spacing:.07em;color:var(--brand-ink);
  font-weight:700;margin:1.6rem 0 .9rem;padding-bottom:.45rem;border-bottom:1px solid var(--line-2);
}
.secthead:first-child{margin-top:0}

/* ---------- filter bar ---------- */
.filterbar{display:flex;gap:.7rem;flex-wrap:wrap;align-items:flex-end;margin-bottom:1.1rem}
.filterbar .row{margin:0}
.filterbar select,.filterbar input{min-width:150px}

/* ---------- flash ---------- */
.flash{padding:.75rem 1rem;border-radius:var(--radius-sm);margin-bottom:1rem;font-weight:550;
  border:1px solid transparent;animation:flashIn 320ms var(--ease-out) both}
.flash-success{background:var(--ok-wash);color:var(--ok);border-color:#bfe6d2}
.flash-error{background:var(--danger-wash);color:var(--danger);border-color:#f5c6c6}
.flash-info{background:var(--info-wash);color:var(--info);border-color:#c6dcf0}
@keyframes flashIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}

/* ---------- misc ---------- */
.muted{color:var(--muted)}
.small{font-size:.82rem}
.right{text-align:right}
.center{text-align:center}
.nowrap{white-space:nowrap}
.mt{margin-top:1rem}.mb0{margin-bottom:0}
.empty{text-align:center;color:var(--muted);padding:3rem 1rem}
.empty svg{width:42px;height:42px;color:var(--muted-2);margin-bottom:.6rem}
.tag{display:inline-block;background:var(--surface-2);border:1px solid var(--line);border-radius:6px;
  padding:.1rem .4rem;font-size:.74rem;color:var(--muted);margin:.1rem}
.pill-count{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 .35rem;border-radius:999px;
  background:var(--brand-wash);color:var(--brand-ink);font-size:.74rem;font-weight:700}

/* ---------- AI panel ---------- */
.aibox{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-2);padding:.9rem 1rem}
.aibox-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap;margin-bottom:.5rem}
.aistatus{font-size:.82rem;color:var(--muted);min-height:1.1rem;margin:.35rem 0}
.aistatus-ok{color:var(--ok);font-weight:600}
.aistatus-err{color:var(--danger);font-weight:600}
.scorebar{display:flex;align-items:center;gap:.5rem;margin:.4rem 0}
.tag-ok{background:var(--ok-wash);color:var(--ok);border-color:#bfe6d2}
.tag-bad{background:var(--danger-wash);color:var(--danger);border-color:#f5c6c6}

/* ---------- score ring ---------- */
.scorering{
  --v:0; width:88px;height:88px;border-radius:50%;flex:none;display:grid;place-items:center;position:relative;
  background:conic-gradient(var(--ring,var(--brand)) calc(var(--v)*3.6deg), var(--line) 0);
  transition:background 600ms var(--ease-out);
}
.scorering::before{content:"";position:absolute;width:66px;height:66px;border-radius:50%;background:var(--surface)}
.scorering span{position:relative;font-weight:750;font-size:1.05rem;letter-spacing:-.02em}
.scoretag{display:inline-grid;place-items:center;min-width:46px;padding:.2rem .45rem;border-radius:7px;
  font-weight:700;font-size:.8rem;font-variant-numeric:tabular-nums}

/* ---------- entrance motion ---------- */
.rise{animation:rise 360ms var(--ease-out) both}
@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
.stagger>*{animation:rise 360ms var(--ease-out) both}
.stagger>*:nth-child(1){animation-delay:20ms}
.stagger>*:nth-child(2){animation-delay:60ms}
.stagger>*:nth-child(3){animation-delay:100ms}
.stagger>*:nth-child(4){animation-delay:140ms}
.stagger>*:nth-child(5){animation-delay:180ms}
.stagger>*:nth-child(6){animation-delay:220ms}

/* ---------- login ---------- */
.authwrap{min-height:100vh;display:grid;place-items:center;padding:1.5rem;
  background:radial-gradient(1100px 560px at 50% -12%,#e9edf5, var(--bg))}
.authcard{width:100%;max-width:390px;background:var(--surface);border:1px solid var(--line);
  border-radius:var(--radius-lg);box-shadow:var(--shadow-pop);padding:2.2rem 2rem;animation:rise 420ms var(--ease-out) both}
.authcard .brandrow{display:flex;align-items:center;gap:.65rem;justify-content:center;margin-bottom:.4rem}
.authcard .mark{width:34px;height:34px;border-radius:10px;background:linear-gradient(140deg,#2f4470,var(--brand));
  color:#fff;display:grid;place-items:center;font-weight:800;box-shadow:0 8px 18px -4px rgba(37,53,89,.45)}
.authcard h1{text-align:center;font-size:1.25rem}
.authcard .tagline{text-align:center;color:var(--muted);font-size:.86rem;margin:.15rem 0 1.5rem}

@media (hover:hover) and (pointer:fine){
  .kpi:hover{transform:translateY(-2px)}
}
@media (prefers-reduced-motion:reduce){
  *{animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important}
  .kpi:hover{transform:none}
}

/* vendor requirement id chip */
.reqid{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.72rem;background:var(--surface-2);
  border:1px solid var(--line);border-radius:5px;padding:.05rem .3rem;color:var(--muted)}

/* fields populated by the resume AI */
.autofilled{background:#f0fdf4;border-color:#86efac}
.autofilled:focus{border-color:var(--brand)}

/* ---------- accordion sections ---------- */
.acc{border:1px solid var(--line);border-radius:var(--radius);margin-bottom:.7rem;background:var(--surface);overflow:hidden}
.acc[open]{box-shadow:var(--shadow-xs)}
.acc-head{
  list-style:none;cursor:pointer;display:flex;align-items:center;gap:.6rem;
  padding:.8rem 1rem;font-size:.8rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;
  color:var(--ink-soft);background:var(--surface-2);user-select:none;
  transition:background 140ms var(--ease-out),color 140ms var(--ease-out);
}
.acc-head::-webkit-details-marker{display:none}
.acc-head::before{
  content:"";width:8px;height:8px;flex:none;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);
  transform:rotate(-45deg);margin-left:.15rem;transition:transform 200ms var(--ease-out);
}
.acc[open] > .acc-head::before{transform:rotate(45deg)}
.acc[open] > .acc-head{color:var(--brand-ink);background:var(--brand-wash)}
.acc-head:hover{background:var(--bg)}
.acc-body{padding:1.1rem 1rem 1.2rem;animation:accIn 220ms var(--ease-out)}
@keyframes accIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
.acc-head .cnt{margin-left:auto;font-size:.7rem;font-weight:600;text-transform:none;letter-spacing:0;color:var(--muted-2)}
.acc-head .cnt.filled{color:var(--ok)}

/* ---------- resume viewer ---------- */
.cvviewer{border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--surface-2)}
.cvviewer iframe{width:100%;height:84vh;min-height:640px;border:0;display:block;background:#fff}
.cvviewer img{width:100%;height:auto;display:block;background:#fff}
.cvtext{white-space:pre-wrap;font-size:.85rem;line-height:1.6;color:var(--ink-soft);
  padding:1.1rem 1.25rem;max-height:84vh;overflow:auto;background:#fff}
.iconlink{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:7px;
  border:1px solid var(--line);background:var(--surface);color:var(--muted);
  transition:transform 140ms var(--ease-out),background 140ms var(--ease-out),color 140ms var(--ease-out)}
.iconlink:hover{background:var(--brand-wash);color:var(--brand-ink);border-color:var(--brand-wash)}
.iconlink:active{transform:scale(.94)}
.iconlink svg{width:16px;height:16px}
.iconlink.disabled{opacity:.35;pointer-events:none}

/* ---------- employment / client history ---------- */
.whcard{position:relative;border:1px solid var(--line);border-radius:var(--radius-sm);
  padding:.7rem .85rem;margin-bottom:.55rem;background:var(--surface)}
.whcard:last-child{margin-bottom:0}
.whcard-top{display:flex;justify-content:space-between;align-items:baseline;gap:.75rem;flex-wrap:wrap}
.whcard-top strong::before{content:"";display:inline-block;width:5px;height:5px;border-radius:1px;
  background:var(--gold);margin-right:.5rem;vertical-align:.18em}
.whclient{display:inline-block;background:var(--brand-wash);color:var(--brand-ink);border-radius:5px;
  padding:.05rem .35rem;font-size:.74rem;font-weight:650;margin-left:.3rem}

/* ---------- rendered Word documents (docx-preview) ---------- */
.docxhost{max-height:84vh;overflow:auto;background:#f1f3f7}
.docxhost .docx-wrapper{background:#f1f3f7;padding:1rem 0 1.5rem;display:flex;flex-direction:column;align-items:center;gap:1rem}
.docxhost .docx{background:#fff;box-shadow:0 2px 12px rgba(15,23,42,.14);margin:0!important}
.docxhost .docx-fallback .cvtext{max-height:none}
.docxhost table{width:auto}
.docxhost img{max-width:100%;height:auto}

/* ---------- resume preview panel (submission form) ---------- */
.cvpanel{border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--surface)}
.cvpanel-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;
  padding:.6rem .9rem;background:var(--surface-2);border-bottom:1px solid var(--line-2)}
.cvpanel-body{border:0;border-radius:0;min-height:620px}
.cvpanel-body iframe{height:82vh;min-height:620px}
.cvpanel-body.docxhost{max-height:82vh}

/* ---------- modal ---------- */
.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:60;
  display:flex;align-items:center;justify-content:center;padding:1.25rem;
  animation:fadeIn 160ms var(--ease-out)}
.modal-backdrop[hidden]{display:none}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.modal{background:var(--surface);border-radius:var(--radius-lg);box-shadow:var(--shadow-pop);
  width:100%;max-width:520px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;
  animation:modalIn 220ms var(--ease-out)}
@keyframes modalIn{from{opacity:0;transform:scale(.96) translateY(8px)}to{opacity:1;transform:scale(1) translateY(0)}}
.modal-head{padding:1.1rem 1.25rem .3rem}
.modal-head h2{font-size:1.05rem}
.modal-body{padding:.6rem 1.25rem 1rem;overflow:auto}
.modal-body .formgrid{gap:.6rem 1rem}
.modal-body label{margin-bottom:.1rem}
.modal-foot{display:flex;justify-content:flex-end;gap:.6rem;padding:.9rem 1.25rem;
  border-top:1px solid var(--line-2);background:var(--surface-2)}
@media (prefers-reduced-motion:reduce){.modal,.modal-backdrop{animation:none}}

/* draws the eye to the step the user still has to take */
@keyframes pulseRing{0%{box-shadow:0 0 0 0 rgba(246,177,41,.55)}70%{box-shadow:0 0 0 8px rgba(246,177,41,0)}100%{box-shadow:0 0 0 0 rgba(246,177,41,0)}}
.btn.pulse{animation:pulseRing 1.6s var(--ease-out) infinite}
@media (prefers-reduced-motion:reduce){.btn.pulse{animation:none;outline:2px solid var(--brand)}}

/* ---------- resume tailoring ---------- */
.tailor-pt{display:flex;gap:.7rem;align-items:flex-start;padding:.7rem .85rem;margin-bottom:.5rem;
  border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);cursor:pointer;
  transition:border-color 140ms var(--ease-out),background 140ms var(--ease-out)}
.tailor-pt:hover{border-color:var(--muted-2);background:var(--surface-2)}
.tailor-pt input{width:auto;margin:.15rem 0 0;flex:none}
.tailor-pt:has(input:checked){border-color:var(--brand);background:var(--brand-wash)}
.tailor-text{display:block;font-size:.88rem;color:var(--ink);line-height:1.5}
.tailor-skills{display:block;margin-top:.35rem}

/* send-to-vendor row on the submission form */
.sendrow{margin-top:1.2rem;padding:.9rem 1rem;border:1px solid var(--brand-wash);border-radius:var(--radius);
  background:var(--brand-wash)}
.sendrow .checks label{background:var(--surface);border-color:var(--brand);font-weight:600}

/* ---------- match analysis dialog ---------- */
.anhead{display:flex;gap:1.1rem;align-items:flex-start;padding:.5rem 0 1rem;border-bottom:1px solid var(--line-2);margin-bottom:.4rem}
.andelta{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;margin-bottom:.35rem}
.anarrow{color:var(--muted-2)}
.angain{color:var(--ok);font-weight:700;font-size:.82rem}
.anloss{color:var(--danger);font-weight:700;font-size:.82rem}
.anlist{margin:.4rem 0 0;padding-left:1.15rem;font-size:.87rem;line-height:1.6;color:var(--ink-soft)}
.anlist li{margin-bottom:.25rem}
.anlist-ok li::marker{color:var(--ok)}
.anlist-bad li::marker{color:var(--danger)}
.anlist-todo li::marker{color:var(--brand)}
#analysis-body table{font-size:.84rem}
#analysis-body td{vertical-align:top}


/* ---------- brand accents ----------
   Gold is the one hue that draws the eye, so it is spent only on the
   score ring, the active nav marker and the KPI a manager scans first. */
.sidebar .brand span{color:var(--gold)}
.navlink.active{background:var(--brand);color:#fff;font-weight:650}
.navlink.active svg{opacity:1;color:var(--gold)}
.kpi .n{color:var(--ink)}
.kpi.k-sub .l .dot{background:var(--gold)}
.kpi.k-sub .n{color:var(--brand)}
.scorering{--ring:var(--gold)}
.authcard .mark{background:linear-gradient(140deg,#2f4470,var(--brand))}
.btn:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.reqid{background:var(--gold-wash);border-color:#f3dfae;color:var(--gold-ink)}
.badge-open{background:var(--brand-wash);color:var(--brand)}
.pill-count{background:var(--brand-wash);color:var(--brand)}
.acc[open] > .acc-head{color:var(--brand);background:var(--brand-wash)}
.secthead{color:var(--brand)}

/* ---------- compact period filter ---------- */
.rangebtn{position:relative;display:inline-block}
.rangebtn .caret{opacity:.6;font-size:.7em;margin-left:.1rem}
.rangemenu{
  position:absolute;right:0;top:calc(100% + .4rem);z-index:30;min-width:13.5rem;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow-pop);padding:.35rem;
  animation:rangeIn 160ms var(--ease-out);
}
@keyframes rangeIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
.rangemenu[hidden]{display:none}
.rangemenu a{
  display:block;padding:.5rem .6rem;border-radius:var(--radius-sm);
  font-size:.87rem;color:var(--ink-soft);font-weight:550;
  transition:background 120ms var(--ease-out),color 120ms var(--ease-out);
}
.rangemenu a:hover{background:var(--surface-2);color:var(--ink)}
.rangemenu a.on{background:var(--brand);color:#fff;font-weight:650}
.rangecustom{border-top:1px solid var(--line-2);margin-top:.35rem;padding:.6rem .6rem .3rem;
  display:grid;gap:.4rem}
.rangecustom label{font-size:.7rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted-2);margin:0}
.rangecustom input{padding:.4rem .5rem;font-size:.82rem}

/* Xcelo's own position reference — navy, to set it apart from a vendor req id */
.reqid.xgid{background:var(--brand-wash);color:var(--brand);border-color:#ccd5e8;font-weight:700}

/* Type-to-search filter field (datalist combobox) */
.filterbar input[list]{min-width:230px}
@media (min-width:900px){.filterbar input[list]{min-width:270px}}

/* ---------- Approval queue ---------- */
.approw{display:flex;gap:1rem;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;
  padding:1rem 1.15rem;border-bottom:1px solid var(--line)}
.approw:last-child{border-bottom:0}
.approw-main{flex:1;min-width:280px}
.approw-top{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-bottom:.2rem}
.approw-act{display:flex;gap:.45rem;align-items:center;flex-wrap:wrap}
.approw-act input[type=text]{min-width:210px}
.btn.danger{color:var(--danger);border-color:#f0c9c9}
.btn.danger:hover{background:var(--danger-wash)}
.appnote{background:var(--surface-2);border:1px solid var(--line);border-radius:8px;
  padding:.6rem .75rem;margin-top:.5rem;font-size:.88rem}
.apphist{margin-top:1rem;padding-top:.85rem;border-top:1px solid var(--line)}
.apphist-row{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;padding:.3rem 0;font-size:.88rem}
.apphist-row .sub{flex-basis:100%;margin-left:.2rem}
.navcount{margin-left:auto;background:var(--gold);color:#3d2a00;font-size:.7rem;font-weight:700;
  border-radius:9px;padding:.05rem .42rem;min-width:18px;text-align:center}

/* A field the workflow owns — shown, not editable */
.lockedfield{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;
  background:var(--surface-2);border:1px solid var(--line);border-radius:8px;padding:.5rem .65rem}

/* ---------- Vendor email review ---------- */
.mrmodal{position:fixed;inset:0;z-index:80;background:rgba(15,23,42,.55);
  display:flex;align-items:flex-start;justify-content:center;padding:2.5vh 1rem;overflow:auto}
.mrmodal[hidden]{display:none}
.mrbox{background:var(--surface);border-radius:14px;box-shadow:var(--shadow-lg,0 24px 60px rgba(15,23,42,.28));
  width:min(940px,100%);max-height:95vh;display:flex;flex-direction:column;overflow:hidden;
  animation:mrIn 180ms var(--ease-out)}
@keyframes mrIn{from{opacity:0;transform:translateY(-8px) scale(.99)}to{opacity:1;transform:none}}
.mrhead{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;
  padding:1.05rem 1.3rem;border-bottom:1px solid var(--line)}
.mrhead h2{margin:0;font-size:1.05rem}
.mrhead .sub{color:var(--muted);font-size:.85rem;margin-top:.15rem}
.mrclose{background:none;border:0;font-size:1.6rem;line-height:1;color:var(--muted);cursor:pointer;padding:0 .2rem}
.mrclose:hover{color:var(--ink)}
.mrbody{display:flex;flex-direction:column;min-height:0;flex:1;padding:1.1rem 1.3rem;gap:.7rem;overflow:auto}
.mrfields{display:grid;grid-template-columns:auto 1fr;gap:.5rem .8rem;align-items:center}
.mrfields label{color:var(--muted);font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;font-weight:600}
.mrfiles{display:flex;gap:.35rem;flex-wrap:wrap}
.mrlabel{font-weight:600;font-size:.9rem;margin-top:.3rem}
.mrcanvas{border:1px solid var(--line);border-radius:10px;background:#fff;color:#1f2937;
  padding:1.1rem 1.2rem;min-height:38vh;max-height:52vh;overflow:auto;font-size:.9rem}
.mrcanvas:focus{outline:2px solid var(--brand);outline-offset:1px}
.mrfoot{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;
  padding-top:.8rem;border-top:1px solid var(--line);margin-top:.2rem}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.82rem}

/* Completion cues for the submission-edit accordion */
.accsummary{background:var(--brand-wash);border:1px solid #ccd5e8;border-radius:10px;
  padding:.7rem .95rem;margin-bottom:1rem;font-size:.9rem;color:var(--brand-ink)}
.accnum{width:22px;height:22px;border-radius:50%;background:var(--brand);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;font-size:.72rem;font-weight:700;
  flex:0 0 auto;margin-right:.55rem}
.acctitle{margin-right:.6rem}
.accchip{font-size:.68rem;font-weight:700;letter-spacing:.02em;border-radius:20px;padding:.15rem .55rem;
  text-transform:uppercase;border:1px solid transparent}
.accchip.ok{background:#e7f6ef;color:#0f7b52;border-color:#bfe6d4}
.accchip.part{background:var(--gold-wash);color:var(--gold-ink);border-color:#f3dfae}
.accchip.todo{background:var(--danger-wash);color:var(--danger);border-color:#f0c9c9}
.accmiss{background:var(--danger-wash);border:1px solid #f0c9c9;color:var(--danger);
  border-radius:8px;padding:.5rem .7rem;font-size:.84rem;margin-bottom:.9rem}
.accfoot{display:flex;justify-content:flex-end;gap:.6rem;margin:1.1rem 0 1.6rem}
.acclinks{display:grid;gap:.6rem;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.acclink{display:flex;flex-direction:column;gap:.15rem;background:var(--surface);border:1px solid var(--line);
  border-radius:10px;padding:.8rem .95rem;text-decoration:none;color:inherit;
  transition:border-color 160ms var(--ease-out),transform 160ms var(--ease-out)}
.acclink:hover{border-color:var(--brand);transform:translateY(-1px)}

.mrcanvas.ro{background:var(--surface-2);cursor:default}
.mrfields input[readonly]{background:var(--surface-2);color:var(--muted)}

/* ---------- Vendor points of contact ---------- */
.poclist{display:flex;flex-direction:column;gap:.7rem}
.poc{display:flex;gap:1rem;align-items:flex-start;flex-wrap:wrap;
  border:1px solid var(--line);border-radius:10px;padding:.85rem .95rem;background:var(--surface-2)}
.poc-grid{display:grid;gap:.7rem 1rem;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));flex:1;min-width:260px}
.poc-side{display:flex;flex-direction:column;gap:.5rem;align-items:flex-start;padding-top:1.35rem}
.poc-recv{display:flex;align-items:center;gap:.4rem;font-size:.84rem;white-space:nowrap}
.poc-remove:disabled{opacity:.4;cursor:not-allowed}
.pocline{display:flex;gap:.5rem;align-items:baseline;flex-wrap:wrap;padding:.3rem 0}
.pocline .muted{font-size:.85rem}

/* ---------- Messaging ---------- */
.chatwrap{display:grid;grid-template-columns:290px 1fr;gap:1rem;height:calc(100vh - 190px);min-height:460px}
@media (max-width:860px){.chatwrap{grid-template-columns:1fr;height:auto}}
.chatside{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  overflow:auto;display:flex;flex-direction:column}
.chatside-h{padding:.7rem .9rem;font-size:.7rem;font-weight:700;letter-spacing:.06em;
  text-transform:uppercase;color:var(--muted);background:var(--surface-2);
  border-bottom:1px solid var(--line);position:sticky;top:0;z-index:1}
.chatlist{display:flex;flex-direction:column}
.titem{display:flex;align-items:center;gap:.65rem;padding:.6rem .8rem;text-decoration:none;
  color:inherit;border-bottom:1px solid var(--line)}
.titem:hover{background:var(--surface-2)}
.titem.on{background:var(--brand-wash)}
.tbody{flex:1;min-width:0;display:flex;flex-direction:column}
.tname{font-weight:600;font-size:.9rem}
.tpreview{color:var(--muted);font-size:.78rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tcount{background:var(--gold);color:#3d2a00;font-size:.7rem;font-weight:700;border-radius:9px;
  padding:.05rem .42rem;min-width:18px;text-align:center}
.avatar{position:relative;width:34px;height:34px;border-radius:50%;background:var(--brand);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700;flex:0 0 auto}
.avatar.lg{width:42px;height:42px;font-size:.85rem}
.presence{position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:50%;
  background:var(--muted-2);border:2px solid var(--surface)}
.presence.on{background:#22c55e}
.chatmain{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  display:flex;flex-direction:column;overflow:hidden;min-height:0}
.chathead{display:flex;align-items:center;gap:.7rem;padding:.8rem 1rem;border-bottom:1px solid var(--line)}
.chatmsgs{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.4rem;min-height:260px}
.chatday{text-align:center;margin:.6rem 0}
.chatday span{background:var(--surface-2);color:var(--muted);font-size:.72rem;
  padding:.15rem .6rem;border-radius:20px}
.msg{display:flex}
.msg.mine{justify-content:flex-end}
.bubble{max-width:min(70%,520px);background:var(--surface-2);border:1px solid var(--line);
  border-radius:14px 14px 14px 4px;padding:.55rem .8rem .5rem;font-size:.9rem;line-height:1.5;
  word-wrap:break-word;overflow-wrap:anywhere}
.msg.mine .bubble{background:var(--brand);border-color:var(--brand);color:#fff;
  border-radius:14px 14px 4px 14px}
.bubble .meta{display:block;font-size:.68rem;opacity:.65;margin-top:.2rem;text-align:right}
.chatform{display:flex;gap:.6rem;padding:.75rem;border-top:1px solid var(--line);align-items:flex-end}
.chatform textarea{flex:1;resize:none;min-height:42px;max-height:140px;padding:.6rem .75rem;
  border:1px solid var(--line);border-radius:10px;font:inherit;font-size:.9rem}
.chatform textarea:focus{outline:2px solid var(--brand);outline-offset:-1px;border-color:var(--brand)}

/* Chat alert status strip */
.alertbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;
  background:var(--gold-wash);border:1px solid #f3dfae;color:var(--gold-ink);
  border-radius:var(--radius-sm);padding:.75rem 1rem;margin-bottom:1rem;font-size:.9rem}
.alertbar.ok{background:var(--ok-wash);border-color:#bfe6d4;color:var(--ok)}
.alertbar.warn{background:var(--danger-wash);border-color:#f0c9c9;color:var(--danger)}
.alertbar-msg{display:flex;flex-direction:column;gap:.15rem;min-width:240px;flex:1}
.alertbar-msg span{font-size:.84rem;opacity:.9;line-height:1.5}
.alertbar-msg code{font-size:.8rem;background:rgba(0,0,0,.06);padding:.05rem .3rem;border-radius:4px}
.alertbar{align-items:flex-start}
.alertbar .actions{flex-shrink:0}

/* Message toasts — bottom right, rising from the bottom. Shown whatever the
   browser's notification permission is, so a message is never missed silently. */
.chat-toasts{position:fixed;right:1.25rem;bottom:1.25rem;z-index:1200;
  display:flex;flex-direction:column-reverse;gap:.6rem;pointer-events:none}
.chat-toast{position:relative;pointer-events:auto;cursor:pointer;width:min(21rem,calc(100vw - 2.5rem));
  background:var(--brand);color:#fff;border-radius:var(--radius);padding:.8rem 2.1rem .85rem 1rem;
  box-shadow:var(--shadow-pop);border-left:3px solid var(--gold);
  opacity:0;transform:translateY(14px);transition:opacity .2s ease,transform .2s ease}
.chat-toast.in{opacity:1;transform:translateY(0)}
.chat-toast .ct-from{font-weight:600;font-size:.86rem;color:var(--gold);margin-bottom:.15rem}
.chat-toast .ct-body{font-size:.86rem;line-height:1.35;opacity:.92;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.chat-toast .ct-close{position:absolute;top:.35rem;right:.45rem;background:none;border:0;
  color:#fff;opacity:.55;font-size:1.15rem;line-height:1;cursor:pointer;padding:.15rem .3rem}
.chat-toast .ct-close:hover{opacity:1}
@media (prefers-reduced-motion:reduce){.chat-toast{transition:none;opacity:1;transform:none}}

/* AI-added resume points, highlighted for internal review only.
   Never written into the .docx - the vendor's copy has no highlighting. */
.xc-added{background:var(--gold-wash) !important;box-shadow:-3px 0 0 var(--gold);
  border-radius:2px;padding:1px 4px 1px 6px;transition:background 150ms var(--ease-out)}
.xc-added-legend{position:sticky;top:0;z-index:3;display:flex;align-items:center;gap:.6rem;
  flex-wrap:wrap;background:var(--gold-wash);border:1px solid #f3dfae;color:var(--gold-ink);
  border-radius:var(--radius-sm);padding:.55rem .8rem;margin:0 0 .75rem;font-size:.82rem}
.xc-added-legend .xc-added-swatch{width:14px;height:14px;border-radius:3px;flex:none;
  background:#fff;box-shadow:-3px 0 0 var(--gold),inset 0 0 0 1px #f3dfae}
.xc-added-legend span:not(.xc-added-swatch){flex:1;min-width:12rem}
@media print{.xc-added{background:none !important;box-shadow:none}.xc-added-legend{display:none}}

.xc-added-legend.warn{background:var(--warn-wash);border-color:#f0dcb4;color:var(--warn)}
.xc-added-list{margin-top:.9rem;border-top:1px solid var(--line);padding-top:.8rem}
.xc-added-list h3{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:.4rem}
.xc-added-list ol{margin:0;padding-left:1.2rem;font-size:.86rem;color:var(--ink-soft)}
.xc-added-list li{margin:.3rem 0}
#resume-review-view .docxview{box-shadow:none}

.badge-gold{background:var(--gold-wash);color:var(--gold-ink);border:1px solid #f3dfae}

/* List tabs (Submissions: sent / drafts / all) */
.tabbar{display:flex;gap:.25rem;border-bottom:1px solid var(--line);margin-bottom:1rem;overflow-x:auto}
.tab{display:inline-flex;align-items:center;gap:.45rem;padding:.55rem .9rem;white-space:nowrap;
  color:var(--muted);font-weight:600;font-size:.88rem;border-bottom:2px solid transparent;
  border-radius:var(--radius-sm) var(--radius-sm) 0 0;
  transition:color 150ms var(--ease-out),background 150ms var(--ease-out),border-color 150ms var(--ease-out)}
.tab:hover{color:var(--ink);background:var(--surface-2)}
.tab.active{color:var(--brand);border-bottom-color:var(--gold)}
.tab-count{display:inline-grid;place-items:center;min-width:1.35rem;height:1.35rem;padding:0 .35rem;
  border-radius:999px;background:var(--surface-2);border:1px solid var(--line);
  font-size:.72rem;font-weight:700;color:var(--muted)}
.tab.active .tab-count{background:var(--brand);border-color:var(--brand);color:#fff}

/* "Fix & add points" dialog: recruiter notes and coverage report */
.tailor-notes{border:1px solid var(--line);border-radius:var(--radius-sm);padding:.7rem .85rem;margin:.8rem 0}
.tailor-notes label{display:block;margin-bottom:.35rem;font-size:.85rem}
.tailor-notes textarea{width:100%;resize:vertical;font:inherit;padding:.5rem .6rem;
  border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface-2)}
.tailor-notes .actions{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin-top:.5rem}
.tailor-cov{border-radius:var(--radius-sm);padding:.6rem .8rem;margin:.6rem 0;font-size:.85rem}
.tailor-cov.ok{background:var(--ok-wash);border:1px solid #bfe6d4;color:var(--ok)}
.tailor-cov.warn{background:var(--warn-wash);border:1px solid #f0dcb4;color:var(--warn)}
.tailor-cov ul{margin:.35rem 0 0;padding-left:1.1rem}
.tailor-terms{display:flex;flex-wrap:wrap;gap:.3rem;margin-top:.3rem}

/* "Add more points" chooser */
.readd-opt{display:block;width:100%;text-align:left;cursor:pointer;margin:.55rem 0;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm);
  padding:.8rem .9rem;transition:border-color 150ms var(--ease-out),background 150ms var(--ease-out),
  transform 120ms var(--ease-out)}
.readd-opt:hover{border-color:var(--brand);background:var(--brand-wash)}
.readd-opt:active{transform:scale(.995)}
.readd-opt.on{border-color:var(--brand);background:var(--brand-wash)}
.readd-opt strong{display:block;font-size:.92rem;color:var(--ink)}
.readd-opt span{display:block;font-size:.83rem;color:var(--muted);margin-top:.15rem}
#readd-manual-box{margin-top:.6rem;border-top:1px solid var(--line);padding-top:.7rem}
#readd-manual-box textarea{width:100%;resize:vertical;font:inherit;padding:.5rem .6rem;margin-top:.35rem;
  border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface-2)}
#readd-manual-box .actions{margin-top:.55rem}

.tailor-selectall{display:flex;align-items:center;gap:.4rem;margin:.8rem 0 .2rem}
.tailor-selectall .muted{margin-left:.35rem}
