/* ============================================================================
   MUVA OS - Provider record (opens as a normal tab, like a Job).
   Reuses MUVA tokens + shared chip/table classes; only adds the record shell,
   its tab panes and the Replace-provider modal. Desktop-first, consistent with
   the Job record's hero/tab/card language.
   ============================================================================ */
.pr{flex:1;overflow-y:auto;min-height:0}
.pr-missing,.pr-empty{padding:26px;color:var(--ink-3);font-size:13px}

/* ---- header (mirrors .jd-hero) ---- */
.pr-head{display:flex;align-items:flex-start;gap:13px;padding:18px 24px 15px;border-bottom:1px solid var(--line)}
.pr-avatar{flex:0 0 auto;width:46px;height:46px;border-radius:13px;display:grid;place-items:center;background:var(--ink);color:#fff;font-size:15px;font-weight:800;letter-spacing:.3px}
.pr-hinfo{flex:1;min-width:0}
.pr-hinfo h2{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:19px;font-weight:800;letter-spacing:-.4px;margin:0 0 3px}
.pr-pref{display:inline-flex;color:var(--amber)}.pr-pref svg{width:15px;height:15px;fill:var(--amber);stroke:var(--amber)}
.pr-hsub{font-size:12.5px;font-weight:600;color:var(--ink-2);margin-bottom:9px}
.pr-hmeta{display:flex;flex-wrap:wrap;gap:22px}
.pr-hm{display:flex;flex-direction:column;gap:1px;min-width:0}
.pr-hm .l{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:var(--ink-3)}
.pr-hm .v{font-size:12.5px;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:280px}
.pr-hacts{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.pr-hacts .btn svg{width:16px;height:16px}

/* ---- tab strip (mirrors .jdtabs) ---- */
.pr-tabs{display:flex;gap:4px;padding:0 24px;border-bottom:1px solid var(--line);overflow-x:auto}
.pr-tab{padding:13px 13px;font-size:12.5px;font-weight:700;color:var(--ink-3);border:none;background:none;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;white-space:nowrap;transition:color .14s var(--ease)}
.pr-tab:hover{color:var(--ink-2)}
.pr-tab.active{color:var(--ink);border-bottom-color:var(--ink)}

/* ---- panes ---- */
.pr-body{padding:20px 24px}
.pr-pane{display:none}
.pr-pane.active{display:block}
.pr-muted{color:var(--ink-3)}
.pr-strong{font-weight:700;color:var(--ink)}
.pr-inline-link{border:none;background:none;font-family:inherit;font-size:12px;font-weight:700;color:var(--green);cursor:pointer;padding:0}
.pr-inline-link:hover{text-decoration:underline}

/* ---- overview cards ---- */
.pr-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px}
.pr-grid-2{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.pr-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:15px 17px}
.pr-card-h{display:flex;align-items:center;gap:9px;margin-bottom:9px}
.pr-card-ic{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:8px;background:var(--surface-2);color:var(--ink-2)}
.pr-card-ic svg{width:15px;height:15px}
.pr-card-h h4{font-size:13px;font-weight:800;letter-spacing:-.2px;margin:0}
.pr-card-rows .kv-row{padding:6px 0;border-bottom:1px solid var(--line);gap:14px}
.pr-card-rows .kv-row:last-child{border-bottom:none}
.pr-card-rows .kv-row .k{flex:0 0 auto}
.pr-card-rows .kv-row .v{text-align:right;min-width:0;overflow:hidden;text-overflow:ellipsis}

/* ---- edit form ---- */
.pr-editwrap{max-width:860px}
.pr-edit-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.pr-edit-h b{font-size:15px;font-weight:800}
.pr-edit-acts{display:flex;gap:8px}
.pr-edit-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:13px}
.pr-fld{display:flex;flex-direction:column;gap:5px}
.pr-fld span{font-size:11px;font-weight:700;color:var(--ink-3)}
.pr-fld input,.pr-fld select{height:38px;padding:0 11px;border:1px solid var(--line-2);border-radius:var(--r-md);font-family:inherit;font-size:13px;color:var(--ink);background-color:var(--surface)}
.pr-fld input:focus,.pr-fld select:focus{outline:none;border-color:var(--ink-3)}

/* ---- list cards (contacts / compliance / documents) ---- */
.pr-listcard{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden}
.pr-lc-h{display:flex;align-items:center;gap:9px;padding:14px 16px;border-bottom:1px solid var(--line)}
.pr-lc-h h4{font-size:13px;font-weight:800;margin:0}
.pr-dnote,.pr-whint{padding:11px 16px;font-size:12px;color:var(--ink-3);background:var(--surface-2);border-bottom:1px solid var(--line)}
.pr-table{width:100%;font-size:12.5px}
.pr-tr{display:grid;grid-template-columns:1.4fr 1.2fr 1fr 1fr 1.6fr .9fr .9fr;gap:12px;align-items:center;padding:11px 16px;border-bottom:1px solid var(--line)}
.pr-tr:last-child{border-bottom:none}
.pr-th{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;color:var(--ink-3);background:var(--surface-2)}
.pr-th-cmp,.pr-tr:not(.pr-th):has(+ .pr-th){}
.pr-tr.pr-th-doc,.pr-tr-doc{grid-template-columns:2fr 1fr 1fr 1fr}
.pr-th-cmp{grid-template-columns:2fr 1fr 1fr 1fr}
.pr-tr>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pr-tr .tnum{font-variant-numeric:tabular-nums}
.pr-tr-doc .pr-strong{display:flex;align-items:center;gap:8px}
.pr-tr-doc .pr-strong svg{width:15px;height:15px;color:var(--ink-3);flex:0 0 auto}
.pr-badge{display:inline-flex;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.3px;padding:2px 8px;border-radius:99px;background:var(--surface-2);color:var(--ink-3);border:1px solid var(--line)}
.pr-badge.on{background:var(--green-soft);color:#0f7a3f;border-color:transparent}

/* compliance list uses the 4-col template */
#prCompliance .pr-table .pr-tr{grid-template-columns:2fr 1fr 1fr 1fr}

/* ---- services chips ---- */
.pr-chips{display:flex;flex-wrap:wrap;gap:7px}
.pr-chip{display:inline-flex;align-items:center;height:26px;padding:0 11px;border-radius:99px;font-size:12px;font-weight:700;background:var(--surface-2);border:1px solid var(--line);color:var(--ink-2)}
.pr-chip.cc{font-variant-numeric:tabular-nums}
.pr-chip.reg{background:#EEF4FF;border-color:transparent;color:#2456B8}
.pr-chip.pref{background:var(--amber-soft);border-color:transparent;color:#8A6116}

/* ---- compliance top + action list ---- */
.pr-cmp-top{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.pr-override{font-size:11px;font-weight:700;color:var(--ink-3)}
.pr-actionlist{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}
.pr-al-item{display:flex;align-items:center;gap:9px;padding:11px 13px;border-radius:var(--r-md);font-size:12.5px;font-weight:600}
.pr-al-item svg{width:16px;height:16px;flex:0 0 auto}
.pr-al-item.bad{background:var(--red-soft);color:#B3261E}
.pr-al-item.warn{background:var(--amber-soft);color:#8A6116}
.pr-al-item b{font-weight:800}

/* ---- activity feed ---- */
.pr-feed{padding:6px 0}
.pr-fe{display:flex;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}
.pr-fe:last-child{border-bottom:none}
.pr-fe-ic{flex:0 0 auto;width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:var(--surface-2);color:var(--ink-2)}
.pr-fe-ic svg{width:15px;height:15px}
.pr-fe-t{font-size:13px;font-weight:600;color:var(--ink)}
.pr-fe-m{font-size:11px;color:var(--ink-3);margin-top:2px}

/* ---- where used ---- */
.pr-wtitle{margin-bottom:12px;align-items:center;justify-content:space-between}
.pr-wtitle-l{display:flex;align-items:center;gap:9px}
.pr-wtitle-l b{font-size:15px;font-weight:800}
.pr-wfilters{display:flex;gap:6px;flex-wrap:wrap}
.pr-wf{height:30px;padding:0 12px;border-radius:99px;border:1px solid var(--line);background:#fff;font-family:inherit;font-size:12px;font-weight:700;color:var(--ink-2);cursor:pointer;transition:.12s var(--ease)}
.pr-wf:hover{background:var(--surface-2);color:var(--ink)}
.pr-wf.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.pr-whint{border:1px solid var(--line);border-radius:var(--r-md);margin-bottom:12px;background:var(--surface-2)}
.pr-wwrap{display:block;overflow:auto;position:relative;border-top:1px solid var(--line);margin:0 -24px}
.pr-wwrap .myd-grid{width:max-content;min-width:100%}
.pr-wlink{color:var(--green);font-weight:700;text-decoration:none}
.pr-wlink:hover{text-decoration:underline}
.pr-provst{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:99px;font-size:11px;font-weight:700;background:var(--surface-2);border:1px solid var(--line);color:var(--ink-2)}
.pr-actst{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:99px;font-size:11px;font-weight:700}
.pr-actst.ip{background:#EEF4FF;color:#2456B8}
.pr-actst.dn{background:var(--green-soft);color:#0f7a3f}
.pr-actst.op{background:var(--surface-2);color:var(--ink-3);border:1px solid var(--line)}

/* ---- replace-provider modal ---- */
.pr-modal-scrim{position:fixed;inset:0;background:rgba(20,20,22,.34);display:none;align-items:center;justify-content:center;z-index:10000;padding:20px}
.pr-modal-scrim.show{display:flex}
.pr-modal{width:min(520px,100%);background:var(--surface);border-radius:var(--r-lg);box-shadow:0 24px 60px rgba(20,20,22,.28);overflow:hidden;animation:prPop .18s var(--ease)}
@keyframes prPop{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
.pr-modal-h{display:flex;align-items:center;justify-content:space-between;padding:17px 20px;border-bottom:1px solid var(--line)}
.pr-modal-h h3{font-size:15px;font-weight:800;margin:0}
.pr-modal-x{width:30px;height:30px;border:none;background:var(--surface-2);border-radius:8px;cursor:pointer;display:grid;place-items:center;color:var(--ink-2)}
.pr-modal-x svg{width:15px;height:15px}
.pr-modal-b{padding:18px 20px}
.pr-repl-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 0}
.pr-repl-row .l{font-size:12px;font-weight:700;color:var(--ink-3)}
.pr-repl-sel{flex-direction:column;align-items:stretch;gap:6px}
.pr-repl-sel .l{margin-bottom:0}
.pr-repl-sel select{height:40px;padding:0 12px;border:1px solid var(--line-2);border-radius:var(--r-md);font-family:inherit;font-size:13px;font-weight:600;color:var(--ink);background-color:var(--surface)}
.pr-repl-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:16px 0}
.pr-rs{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-md);padding:12px 8px;text-align:center}
.pr-rs .n{display:block;font-size:20px;font-weight:800;letter-spacing:-.5px}
.pr-rs .l{display:block;font-size:10px;font-weight:700;color:var(--ink-3);margin-top:3px;line-height:1.25}
.pr-repl-note{font-size:12px;color:var(--ink-2);background:var(--amber-soft);border-radius:var(--r-md);padding:11px 13px}
.pr-modal-f{display:flex;justify-content:flex-end;gap:9px;padding:15px 20px;border-top:1px solid var(--line)}
.pr-modal-f .btn{min-width:96px;justify-content:center}

/* ---- Used-on column (directory) ---- */
.prov-use{border:none;background:none;font-family:inherit;font-size:12.5px;font-weight:700;color:var(--green);cursor:pointer;padding:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.prov-use:hover{text-decoration:underline}
.prov-use.none{color:var(--ink-3);font-weight:600;cursor:default}
.prov-use.none:hover{text-decoration:none}
.prov-usetip{position:fixed;z-index:10001;left:-9999px;top:-9999px;min-width:210px;background:var(--ink);color:#fff;border-radius:10px;padding:9px 4px 5px;box-shadow:0 12px 30px rgba(0,0,0,.26);pointer-events:none;opacity:0;transform:translateY(3px);transition:opacity .12s var(--ease),transform .12s var(--ease)}
.prov-usetip.show{opacity:1;transform:none}
.prov-usetip .put-h{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.5px;color:rgba(255,255,255,.55);padding:0 11px 6px}
.prov-usetip .put-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:4px 11px}
.prov-usetip .put-l{font-size:12px;font-weight:600;color:rgba(255,255,255,.85)}
.prov-usetip .put-n{font-size:12.5px;font-weight:800;font-variant-numeric:tabular-nums}
.prov-usetip .put-n.z{color:rgba(255,255,255,.4)}

/* ---- responsive ---- */
@media (max-width:900px){
  .pr-head{flex-wrap:wrap;gap:11px}
  .pr-hacts{width:100%;order:3}
  .pr-repl-summary{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:760px){
  .pr-body{padding:14px 16px}
  .pr-head{padding:14px 16px}
  .pr-tabs{padding:0 16px}
  .pr-tr{grid-template-columns:1fr 1fr;gap:6px}
  .pr-th{display:none}
}

/* ---- Step 6: the real compliance administration surface ---- */
.pr-cmp-sub{font-size:11.5px;color:var(--ink-3);font-weight:600}
.pr-cmp-banner{padding:10px 13px;margin:0 0 12px;border-radius:10px;font-size:12.5px;line-height:1.5;
  border:1px solid var(--line)}
.pr-cmp-banner.bad{background:var(--red-soft,#fdecec);color:#8a1f1f;border-color:#f2c9c9}
.pr-cmp-banner.warn{background:var(--amber-soft);color:#8a5a10;border-color:#f0dcb8}
.pr-th-cmp5{display:grid;grid-template-columns:1.6fr 1.2fr 1.1fr .9fr .7fr;gap:10px}
.pr-table .pr-tr.pr-th-cmp5~.pr-tr,.pr-tr[data-creq]{display:grid;grid-template-columns:1.6fr 1.2fr 1.1fr .9fr .7fr;gap:10px}
.pr-req{display:inline-block;margin-left:7px;padding:1px 6px;border-radius:99px;font-size:9.5px;font-weight:800;
  letter-spacing:.2px;background:var(--surface-2);color:var(--ink-2);border:1px solid var(--line);vertical-align:middle}
.pr-days{color:var(--ink-3);font-size:11px;font-weight:600}
.pr-cmp-acts{display:flex;gap:8px;justify-content:flex-end}
.cmp-chip.cmp-none{background:var(--surface-2);color:var(--ink-2);border-color:var(--line)}
.pr-cmp-note{margin:12px 2px 0;font-size:11.5px;color:var(--ink-2);line-height:1.5}

/* ============ EVIDENCE STATE + THE MOBILE COMPLIANCE SHEET ============
   Evidence is its own column because a recorded requirement and a captured
   certificate are two different claims, and the seeded rows hold the first
   without the second. */
.pr-th-cmp6{display:grid;grid-template-columns:1.5fr 1fr 1fr .85fr 1fr .7fr;gap:10px}
.pr-table .pr-tr.pr-th-cmp6~.pr-tr,#prCompliance .pr-tr[data-creq]{display:grid;
  grid-template-columns:1.5fr 1fr 1fr .85fr 1fr .7fr;gap:10px}
.pr-ev{font-size:12px}
.pr-ev.ev-ok{color:#0F7A41}
.pr-ev.ev-bad{color:#B02020}
.pr-ev.ev-none{color:var(--ink-3)}
/* the phone entry point is desktop-hidden: a mouse user has the table */
.pr-cmp-phone{display:none}
.prm-sheet .prm-banner{display:flex;flex-direction:column;gap:3px;padding:12px 13px;border-radius:12px;
  margin-bottom:13px;font-size:13px;line-height:1.45}
.prm-sheet .prm-banner b{font-size:13.5px}
.prm-sheet .prm-banner.bad{background:var(--red-soft);color:#7C1D1D}
.prm-sheet .prm-banner.warn{background:var(--amber-soft);color:#7A4E0E}
.prm-sheet .prm-banner.ok{background:var(--green-soft);color:#0F5A32}
.prm-list{display:flex;flex-direction:column;gap:0}
.prm-row{padding:13px 0;border-bottom:1px solid var(--line)}
.prm-row:last-child{border-bottom:0}
.prm-rtop{display:flex;align-items:center;justify-content:space-between;gap:9px}
.prm-name{font-size:14px;font-weight:700;color:var(--ink)}
.prm-meta{margin-top:4px;font-size:12px;color:var(--ink-2);line-height:1.5}
.prm-meta .ev-ok{color:#0F7A41}
.prm-meta .ev-bad{color:#B02020}
.prm-meta .ev-none{color:var(--ink-3)}
.prm-acts{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}
.prm-btn{min-height:44px;padding:0 15px;border:1px solid var(--line);border-radius:11px;
  background:var(--surface);font:inherit;font-size:13.5px;font-weight:650;color:var(--ink);cursor:pointer;
  transition:transform 140ms cubic-bezier(.23,1,.32,1),border-color 140ms ease}
.prm-btn:hover{border-color:var(--ink-3)}
.prm-btn:active{transform:scale(.97)}
.prm-wide{width:100%;min-height:48px;margin-top:15px;justify-content:center}
.prm-note{margin-top:13px;font-size:11.5px;color:var(--ink-2);line-height:1.55}
.prm-body{padding-bottom:calc(20px + env(safe-area-inset-bottom,0px))}
@media (max-width:760px){
  .pr-cmp-phone{display:inline-flex}
  /* the six-column table cannot fit a phone, so it stacks and the sheet is
     the surface a supervisor actually uses */
  .pr-th-cmp6{display:none}
  #prCompliance .pr-tr[data-creq]{grid-template-columns:1fr 1fr;gap:4px 10px}
}

/* ================= PROVIDER REGISTERS ON THE SHARED E20 GRID =================
   The old provider tables lived in a rounded inset card, so they read as an
   embedded prototype beside empty space while My Day used the whole workspace.
   The white provider workspace IS the surface: the grid host cancels the
   .pr-body inset exactly, the same escape the Where-used grid already used, so
   the column header, every row and every hairline span the full width.

   No card, no radius, no shadow around a register. */
.pr-gwrap{display:block;overflow:auto;position:relative;border-top:1px solid var(--line);
  margin:0 -24px;min-height:0}
.pr-gwrap .myd-grid{width:max-content;min-width:100%}
/* the compact toolbar: search and filters left, Columns and one primary right */
.pr-tb{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:0 0 11px}
.pr-tb-l{display:flex;align-items:center;gap:9px;flex-wrap:wrap;flex:1;min-width:0}
.pr-tb-r{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.pr-tb-srch{position:relative;display:inline-flex;align-items:center}
.pr-tb-srch svg{position:absolute;left:9px;width:14px;height:14px;color:var(--ink-3);pointer-events:none}
.pr-tb-srch input{width:230px;height:32px;border:1px solid var(--line);border-radius:9px;
  background:var(--surface);font:inherit;font-size:12.5px;color:var(--ink);padding:0 11px 0 28px}
.pr-tb-srch input:hover{border-color:var(--ink-3)}
.pr-tb-srch input:focus{outline:none;border-color:var(--ink-3);box-shadow:0 0 0 3px rgba(20,20,22,.06)}
.pr-tb-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;
  padding:0 7px;border-radius:var(--pill);background:var(--slate-soft);color:var(--ink-2);
  font-size:11px;font-weight:750;font-variant-numeric:tabular-nums}
.pr-tb .btn{height:var(--ctl-h)}
/* the second register on the Compliance tab gets a heading row, not a card */
.pr-subhead{display:flex;align-items:center;gap:9px;margin:26px 0 11px}
.pr-subhead h4{margin:0;font-size:13px;font-weight:800;letter-spacing:-.1px}
.pr-subhead .btn{height:var(--ctl-h)}
.pr-cmp-bannerhost:empty{display:none}
.pr-cmp-bannerhost{margin-bottom:12px}
/* evidence state reads as its own fact, never as part of the status chip */
.pr-ev{font-size:12px}
.pr-ev.ev-ok{color:#0F7A41}
.pr-ev.ev-bad{color:#B02020}
.pr-ev.ev-none{color:var(--ink-3)}
.pr-days{color:#8A5B10;font-weight:650;font-size:11px}
/* phone: full-width operational rows, and the desktop grid is never mounted */
.pr-mlist{display:none}
@media (max-width:760px){
  .pr-gwrap{display:none}
  .pr-mlist{display:block;margin:0 -16px}
  .pr-mrow{display:block;width:100%;min-height:64px;padding:12px 16px;background:var(--surface);
    border:0;border-bottom:1px solid var(--line);font:inherit;text-align:left;cursor:pointer;
    transition:background 140ms ease}
  .pr-mrow:active{background:var(--surface-2)}
  .pr-mrow-t{display:flex;align-items:center;justify-content:space-between;gap:9px}
  .pr-mrow-n{font-size:14px;font-weight:700;color:var(--ink)}
  .pr-mrow-m{margin-top:3px;font-size:12px;color:var(--ink-2);line-height:1.5}
  .pr-tb-srch{flex:1;min-width:0}
  .pr-tb-srch input{width:100%}
  .pr-subhead{margin-top:22px}
}

/* ---- the register beside the claim (Phase 2, 4 September 2026) ----------
   A mismatch is amber: the ABN is active, something differs, a person
   decides. The comparison table lists MUVA's value beside the register's,
   and a differing row is tinted so the eye lands on what is being adopted. */
.pr-ev.ev-warn{color:var(--amber)}
.cd-cmp td,.cd-cmp th{padding:6px 8px;vertical-align:top}
.cd-cmp th{font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-3);text-align:left}
.cd-cmp tr.cd-diff td{background:var(--warn-soft,rgba(217,162,60,.12))}
.cd-cmp .ev-ok{color:#0F7A41;font-size:12px}
.cd-adopt{display:inline-flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap}
/* the comparison dialog carries four columns: it takes the room they need */
.cd-cmp td{white-space:normal;word-break:normal}
.cd-cmp td:nth-child(2),.cd-cmp td:nth-child(3){min-width:150px}
