/* ============================================================================================================================
   A CLIENT'S RECORD, AS DRAWN — redesign step 16 part 4 (R-644; public/js/99v-client-record.js). The drawing's record pattern (the
   Job page, np-job.css) inside the client drawer: crumb, name and its state, one line, actions at the right, tabs, a wide column and
   a rail of small cards. NEW PACE ONLY: every rule starts with html[data-new-pace], and the drawer wears .cr only in the new PACE.
   The drawer lives in #layer, outside the page, so the words' colours are said here from the new look's own names (the same list as
   new-pace-look.css "TEXT INK RULE") — 41's Emails panel, drawn inside it, writes with those names. Status labels are np-places.css's
   one label look (.np-st); this file only puts its colour at the row's edge.
   ============================================================================================================================ */
html[data-new-pace] .cr,html[data-new-pace] .cr *{
  --text:var(--fx-text); --text2:var(--fx-text2); --text3:var(--fx-text3); --ink:var(--fx-text); --ink2:var(--fx-text2); --ink3:var(--fx-text3);
  --accent:var(--fx-accent); --purple:var(--fx-purple); --amber:var(--fx-amber); --gold:var(--fx-amber); --red:var(--fx-red); --green:var(--fx-green); --teal:var(--fx-teal);
}

/* ── the drawer: one pane on the frosted wall, the record's own top and tabs fixed, each tab scrolling in its own box ── */
html[data-new-pace] .cr-scrim{background:rgba(10,14,26,.42)}
/* it covers the page area exactly — from where the page starts (the menu's edge) to the window's — so the whole menu stays readable
   under the frosted wall and nothing of the list behind peeks out in pieces; its Minimise and Close sit in its own top bar */
html[data-new-pace] .cr.dwr{width:calc(100% - var(--rail-w) - 20px);max-width:none;gap:0;padding:var(--np-space-2_5) var(--np-space-2_5) var(--np-space-2_5) 0}
@media (min-width:901px){ html[data-new-pace] body.ui-kit #sidebar.pinned ~ #layer .cr.dwr{width:calc(100% - var(--rail-w-open) - 20px)} }
html[data-new-pace] .cr .cr-pane{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;border:0;border-radius:var(--np-round-2xl);
  background:var(--np-float-wall,var(--fx-wall));background-color:var(--fx-ground);box-shadow:var(--fx-float);color:var(--fx-text);font:400 var(--np-text-body)/1.5 var(--font)}
html[data-new-pace] .cr .btn{min-height:var(--np-h-control);padding:0 var(--np-space-4_5);font:600 var(--np-text-lg)/1 var(--font);display:inline-flex;align-items:center;justify-content:center;gap:var(--np-space-2);white-space:nowrap}
html[data-new-pace] .cr .btn-primary{font-weight:700}
html[data-new-pace] .cr .btn-sm{min-height:var(--np-h-control-sm);padding:0 var(--np-space-3);font-size:var(--np-text-md)}
html[data-new-pace] .cr .btn svg{width:18px;height:18px;flex:none}
html[data-new-pace] .cr .cr-lnk{background:transparent;border-color:transparent;box-shadow:none;color:var(--fx-accent);font-weight:700;padding:0 var(--np-space-1_5);min-height:var(--np-h-control-sm)}

/* ── the top: crumb, the name and its state, one line, the actions at the right ── */
html[data-new-pace] .cr-top{position:relative;display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--np-space-3_5);padding:var(--np-space-3_5) var(--np-space-4) 0 var(--np-space-7);flex:none}
html[data-new-pace] .cr-top > .cr-bar{flex:1 1 100%;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:var(--np-space-3);margin-bottom:-14px}   /* the client record's own bar: the candidate record shares the class name, so this stays inside .cr-top (it pulled the candidate's name up under its crumb) */
html[data-new-pace] .cr-wins{flex:none;display:flex;gap:var(--np-space-2)}
html[data-new-pace] .cr-win{width:40px;height:var(--np-h-control-sm);display:grid;place-items:center;padding:0;border:0;border-radius:var(--np-round-lg);cursor:pointer;
  background:var(--card-solid);color:var(--fx-text);box-shadow:var(--fx-glass-sh);font:700 var(--np-text-xl)/1 var(--font)}
html[data-new-pace] .cr-win svg{width:18px;height:18px}
html[data-new-pace] .cr-main{flex:1 1 300px;min-width:0}
html[data-new-pace] .cr-crumb{margin:0;font-size:var(--np-text-md);color:var(--fx-text2);overflow-wrap:anywhere;min-width:0}
html[data-new-pace] .cr-crumb-a{background:none;border:0;padding:0;cursor:pointer;color:var(--fx-accent);font:700 var(--np-text-md)/1.5 var(--font)}
html[data-new-pace] .cr-t{margin:0;font:700 var(--np-text-6xl)/1.2 var(--font);letter-spacing:-.015em;color:var(--fx-text);overflow-wrap:anywhere}
html[data-new-pace] .cr-t .np-st{vertical-align:middle;margin-left:var(--np-space-1_5)}
html[data-new-pace] .cr-sub{margin:var(--np-space-1_5) 0 0;font-size:var(--np-text-xl);line-height:1.4;color:var(--fx-text2);overflow-wrap:anywhere}
html[data-new-pace] .cr-web{color:var(--fx-accent);font-weight:600;text-decoration:none}
html[data-new-pace] .cr-acts{display:flex;flex-wrap:wrap;align-items:center;gap:var(--np-space-2_5)}
html[data-new-pace] .cr-top > .cr-acts{margin-right:var(--np-space-3)}
html[data-new-pace] .cr-nj{display:contents}   /* New job's own slot (filled once the server's job rule answers): its button sits in the row */
html[data-new-pace] .cr .cr-more{margin:0}   /* 99c's More (.cl-more) sat under the people; here it sits in the row */
html[data-new-pace] .cr .cr-more > summary{list-style:none;display:flex}
html[data-new-pace] .cr .cr-menu{left:auto;right:0;top:calc(100% + 6px);min-width:240px;padding:var(--np-space-1_5);border:0;border-radius:var(--np-round-xl);background:var(--card-solid);box-shadow:var(--fx-float);z-index:40}
html[data-new-pace] .cr .cr-menurow{min-height:var(--np-h-control);padding:0 var(--np-space-3);border-radius:var(--np-round-md);font:500 var(--np-text-lg)/1.2 var(--font);color:var(--fx-text)}
html[data-new-pace] .cr .ot-slot:empty{display:none}
html[data-new-pace] .cr .ot-decides{font-size:var(--np-text-md);color:var(--fx-text2)}

/* ── the tabs: where you are is the person's colour (41's clientsTab sets .on; this file aria-selected) ── */
/* the tab list and History (a window, so outside the list) flow as ONE run of words: on a phone they wrap together, History on the
   same line as the last tabs when it fits, as in the drawing */
html[data-new-pace] .cr-tabs{flex:none;display:block;margin:var(--np-space-3_5) var(--np-space-7) 0;border-bottom:1px solid var(--line);font-size:0;line-height:0}
html[data-new-pace] .cr-tablist{display:inline}
html[data-new-pace] .cr-tab{display:inline-block;vertical-align:bottom;margin-right:var(--np-space-1);min-height:var(--np-h-control);padding:0 var(--np-space-4);border:0;border-bottom:3px solid transparent;background:none;cursor:pointer;color:var(--fx-text2);font:600 var(--np-text-lg)/1 var(--font);
  transition:color .15s var(--quick),border-color .15s var(--quick)}
html[data-new-pace] .cr-tab b{font-weight:inherit}
html[data-new-pace] .cr-tab.on{color:var(--fx-accent);border-bottom-color:var(--fx-acc);font-weight:700}

/* ── the panels: every one is in the page; the one not shown is hidden (a panel's display must not undo [hidden]) ── */
html[data-new-pace] .cr-panel{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:var(--np-space-5) var(--np-space-7) var(--np-space-8);display:flex;flex-direction:column;gap:var(--np-space-5)}
html[data-new-pace] .cr [data-clpanel][hidden]{display:none}
html[data-new-pace] .cr-cols{display:flex;flex-wrap:wrap;gap:var(--np-space-5);align-items:flex-start}
html[data-new-pace] .cr-wide{flex:999 1 460px;min-width:0;display:flex;flex-direction:column;gap:var(--np-space-5)}
html[data-new-pace] .cr-rail{flex:1 1 300px;min-width:0;display:flex;flex-direction:column;gap:var(--np-space-5)}
html[data-new-pace] .cr .cr-card{margin:0;padding:0;overflow:hidden;flex:none}
html[data-new-pace] .cr .cr-card.cr-pad,html[data-new-pace] .cr .cr-pad{padding:var(--np-space-4_5) var(--np-space-5)}
html[data-new-pace] .cr h2.cr-pad{padding-bottom:var(--np-space-3)}
html[data-new-pace] .cr-h{margin:0;font:700 var(--np-text-xl)/1.3 var(--font);color:var(--fx-text);letter-spacing:0;text-transform:none}
html[data-new-pace] .cr-h3{margin:var(--np-space-3_5) 0 var(--np-space-1);font:700 var(--np-text-md)/1.3 var(--font);color:var(--fx-text2)}
html[data-new-pace] .cr-hint{margin:var(--np-space-2) 0 0;font-size:var(--np-text-md);line-height:1.45;color:var(--fx-text2)}
html[data-new-pace] .cr-note{margin:0;font-size:var(--np-text-md);font-weight:500;color:var(--fx-text2)}
html[data-new-pace] .cr-tx{flex:1 1 auto;min-width:0}
html[data-new-pace] .cr-tx b{display:block;font-weight:600;color:var(--fx-text);overflow-wrap:anywhere}
html[data-new-pace] .cr-tx b .np-st{margin-left:var(--np-space-1_5);vertical-align:1px}
html[data-new-pace] .cr-tx small{display:block;font-size:var(--np-text-md);line-height:1.4;color:var(--fx-text2);overflow-wrap:anywhere}
html[data-new-pace] .cr-tx a{color:var(--fx-accent);text-decoration:none}
html[data-new-pace] .cr-foot{padding:var(--np-space-1_5) var(--np-space-3_5);border-top:1px solid var(--line)}
html[data-new-pace] .cr-links{display:flex;flex-wrap:wrap;gap:var(--np-space-1_5) var(--np-space-3_5);margin-top:var(--np-space-2_5)}

/* the jobs: quiet rows, the status label's colour as a stripe at the row's left edge (as the drawn Leads list) */
html[data-new-pace] .cr-row{display:flex;align-items:center;gap:var(--np-space-3);width:100%;min-height:64px;padding:var(--np-space-3) var(--np-space-5);border:0;border-top:1px solid var(--line);border-radius:0;
  background:none;text-align:left;font:inherit;color:var(--fx-text);cursor:pointer;box-shadow:inset 3px 0 0 var(--np-stripe,transparent);transition:background-color .15s var(--quick)}
html[data-new-pace] .cr-row:has(.np-st.np-green){--np-stripe:var(--fx-green)}
html[data-new-pace] .cr-row:has(.np-st.np-amber){--np-stripe:var(--fx-amber)}
html[data-new-pace] .cr-row:has(.np-st.np-blue){--np-stripe:var(--fx-teal)}
html[data-new-pace] .cr-row:has(.np-st.np-grey){--np-stripe:var(--fx-text3)}
html[data-new-pace] .cr-row[disabled]{cursor:default}
html[data-new-pace] .cr-row .cr-tx b{font-size:var(--np-text-body)}

/* the last email, where things stand */
html[data-new-pace] .cr-box{margin-top:var(--np-space-3);padding:var(--np-space-3_5) var(--np-space-4);border-radius:var(--np-round-md);background:color-mix(in srgb,var(--card-solid) 70%,transparent);border:1px solid var(--line)}
html[data-new-pace] .cr-lbl{font:700 var(--np-text-sm)/1.3 var(--font);color:var(--fx-text2);margin-bottom:var(--np-space-1_5);overflow-wrap:anywhere}
html[data-new-pace] .cr-subj{margin:0;font-weight:600;font-size:var(--np-text-lg);color:var(--fx-text);overflow-wrap:anywhere}
html[data-new-pace] .cr-quote{margin:var(--np-space-1) 0 0;font-size:var(--np-text-md);line-height:1.5;color:var(--fx-text);overflow-wrap:anywhere}
html[data-new-pace] .cr-say{margin:var(--np-space-2) 0 0;font-size:var(--np-text-lg);line-height:1.5;color:var(--fx-text);overflow-wrap:anywhere}
html[data-new-pace] .cr-steps{margin:var(--np-space-1) 0 0;padding-left:var(--np-space-4_5);font-size:var(--np-text-md);line-height:1.45;color:var(--fx-text2)}
html[data-new-pace] .cr-steps li + li{margin-top:var(--np-space-1)}
html[data-new-pace] .cr-steps b{color:var(--fx-text);font-weight:600}

/* the people */
html[data-new-pace] .cr-people{margin-top:var(--np-space-1_5)}
html[data-new-pace] .cr-person{display:flex;flex-wrap:wrap;align-items:center;gap:var(--np-space-2) var(--np-space-2_5);padding:var(--np-space-2) 0;min-height:56px}
html[data-new-pace] .cr-person + .cr-person{border-top:1px solid var(--line)}
html[data-new-pace] .cr-person .cr-tx{flex:1 1 160px}
html[data-new-pace] .cr-pacts{display:flex;gap:var(--np-space-2)}

/* the files */
html[data-new-pace] .cr-filebar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--np-space-2_5)}
html[data-new-pace] .cr-files{margin-top:var(--np-space-2)}
html[data-new-pace] .cr-file{display:flex;align-items:center;gap:var(--np-space-3);padding:var(--np-space-2_5) 0;min-height:56px}
html[data-new-pace] .cr-file + .cr-file{border-top:1px solid var(--line)}
html[data-new-pace] .cr-tick{width:20px;height:20px;flex:none;margin:0;accent-color:var(--fx-acc);cursor:pointer}
html[data-new-pace] .cr .cr-upload{cursor:pointer;margin:0}

/* the Emails tab holds 41's own panel: it takes the new look's words, and no small all-capitals line (DESIGN.md) */
html[data-new-pace] .cr-old{margin-top:var(--np-space-1_5);font-size:var(--np-text-lg);color:var(--fx-text)}
html[data-new-pace] .cr-mail > .cr-old:first-child{margin-top:0}
html[data-new-pace] .cr-old [style*="uppercase"]{text-transform:none !important;letter-spacing:0 !important;font-size:var(--np-text-md) !important}
html[data-new-pace] .cr-old .card{box-shadow:none}
/* its small type comes up to the record's (14px or more, as every drawn screen) */
html[data-new-pace] .cr-old .fs-10_5,html[data-new-pace] .cr-old .fs-11,html[data-new-pace] .cr-old .fs-11_5,html[data-new-pace] .cr-old .fs-12{font-size:var(--np-text-md)}
html[data-new-pace] .cr-old .fs-12_5,html[data-new-pace] .cr-old .fs-13{font-size:var(--np-text-lg)}
html[data-new-pace] .cr-old .fs-13_5{font-size:var(--np-text-body)}
html[data-new-pace] .cr-old .dt-empty{padding:var(--np-space-4_5) 0;color:var(--fx-text2);font-size:var(--np-text-lg)}
/* a Reply that the server would refuse is not offered: only the client's owner (or an admin) may email it (D-0035; 41 draws it for
   everyone who may act on clients) */
html[data-new-pace] .cr:not(.cr-owner) .cr-old button[onclick*="clientsReply("]{display:none}

@media (hover:hover) and (pointer:fine){
  html[data-new-pace] .cr-row:not([disabled]):hover{background:var(--hover)}
  html[data-new-pace] .cr .cr-menurow:hover{background:var(--hover)}
  html[data-new-pace] .cr .cr-win:hover{filter:brightness(1.05)}
}

/* ── a phone (the drawer is the whole screen from 900px, ui.css): one column; the whole record scrolls; nothing sideways ── */
@media (max-width:900px){
  html[data-new-pace] .cr.dwr{width:100%;padding:0}
  html[data-new-pace] .cr .dwr-right.cr-pane{display:block;overflow-x:hidden;overflow-y:auto;border-radius:0}
  html[data-new-pace] .cr-top{padding:var(--np-space-3) var(--np-space-3) 0 var(--np-space-4)}
  html[data-new-pace] .cr-top > .cr-bar{margin-bottom:-6px}
  html[data-new-pace] .cr-main{flex-basis:100%;padding-right:var(--np-space-1)}
  html[data-new-pace] .cr-win{width:44px;height:var(--np-h-control)}
  html[data-new-pace] .cr-min{display:none}   /* minimised windows are a desktop thing (today's drawer has none on a phone either) */
  html[data-new-pace] .cr-t{font-size:var(--np-text-5xl)}
  html[data-new-pace] .cr-sub{font-size:var(--np-text-body)}
  html[data-new-pace] .cr-top > .cr-acts{width:100%;margin-right:var(--np-space-1)}
  html[data-new-pace] .cr-top > .cr-acts > .btn,html[data-new-pace] .cr-top > .cr-acts > .cr-nj > .btn{flex:1 1 auto}
  html[data-new-pace] .cr-top > .cr-acts{position:relative}   /* More's menu opens under the whole row, the row's width — wherever More has wrapped to */
  html[data-new-pace] .cr .cr-more{position:static}
  html[data-new-pace] .cr .cr-menu{left:0;right:0;min-width:0}
  html[data-new-pace] .cr-tabs{margin:var(--np-space-3_5) var(--np-space-4) 0}
  html[data-new-pace] .cr-tab{padding:0 var(--np-space-3)}   /* the tabs wrap onto a second line — every one in sight, none scrolled away */
  html[data-new-pace] .cr-panel{overflow:visible;padding:var(--np-space-4) var(--np-space-4) var(--np-space-7)}
  html[data-new-pace] .cr .cr-card.cr-pad,html[data-new-pace] .cr .cr-pad{padding:var(--np-space-4)}
  html[data-new-pace] .cr-row{padding:var(--np-space-3) var(--np-space-4)}
  html[data-new-pace] .cr-old{overflow-x:auto}
  html[data-new-pace] .cr input:not([type=checkbox]):not([type=file]),html[data-new-pace] .cr select,html[data-new-pace] .cr textarea{font-size:var(--np-text-body) !important}
}
/* the window the record opens to email the client (41's) writes its message in a 13px box: on a phone a field under 16px makes the
   browser zoom in, so the new PACE brings it up to the floor every other field already has (mobile.css) */
@media (max-width:860px){
  html[data-new-pace] #client-em-body{font-size:var(--np-text-body) !important}
}
/* Edit a client's details (99zl, D-0464): two columns of fields on a laptop, one on a phone */
html[data-new-pace] .ce-win{width:640px;max-width:94vw}
html[data-new-pace] .ce-body{display:flex;flex-direction:column;gap:var(--np-space-3);max-height:70vh;overflow:auto}
html[data-new-pace] .ce-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--np-space-3)}
html[data-new-pace] .ce-f{display:flex;flex-direction:column;gap:var(--np-space-1_5);min-width:0}
html[data-new-pace] .ce-f.ce-wide{grid-column:1 / -1}
html[data-new-pace] .ce-f .inp{min-height:var(--np-h-control);font-size:var(--np-text-body)}
html[data-new-pace] .ce-h{margin:var(--np-space-2) 0 0;font:700 var(--np-text-lg)/1.3 var(--font);color:var(--fx-text)}
html[data-new-pace] .ce-win .mf{display:flex;justify-content:flex-end;gap:var(--np-space-2)}
@media (max-width:860px){ html[data-new-pace] .ce-grid{grid-template-columns:minmax(0,1fr)} }
/* every email with the client (99v, D-0464): the job page's rows inside the record's card */
html[data-new-pace] .cr-mails .jd-mail{padding-left:0;padding-right:0}
html[data-new-pace] .cr-mails .jd-mail:first-child{border-top:0}
html[data-new-pace] .cr-mail-acts{display:flex;flex-wrap:wrap;align-items:center;gap:var(--np-space-2);margin-top:var(--np-space-2)}
html[data-new-pace] .cr-mails .jd-mail-body{white-space:pre-wrap}
