/* PH right side panels - one floating look (2026-11-22 | Monique: "Update all of the Right side modal popups to be using this styling now", her
   "A & J Share Trust · quickview" mockup with panel-chrome.css).
   Every panel that opens from the right edge now floats 12px in from the top, right and bottom edges, with 20px corners and a soft shadow, and its
   dim starts UNDER the app's title bar, so the title bar can still move the window and its buttons still work. In a browser tab there is no
   title bar, so the panel sits 12px from the top of the window. Phones (560px and less): full width under the title bar, square corners.
   PhFooter.ascx loads this file on every page, straight after ph-titlebar.css. Every rule starts with :root:root body so it beats the panels' own
   rules and ph-titlebar.css's "starts under the title bar" list, whichever loads later.
   A NEW right side panel: add its box to the lists below (and its dim to the dims list). */

:root { --ph-chrome-top: 0px; --ph-panel-edge: 12px; --ph-panel-r: 20px; --ph-panel-dim: rgba(18, 52, 59, .32); --ph-panel-shadow: 0 24px 60px rgba(18, 52, 59, .28); }
@media (display-mode: window-controls-overlay) { :root:not(.in-popup) { --ph-chrome-top: var(--ph-wco-h, env(titlebar-area-height, 33px)); } }
html.in-popup { --ph-chrome-top: 0px; }
@media (max-width: 560px) { :root { --ph-panel-edge: 0px; --ph-panel-r: 0px; } }

/* 1. Panels that are fixed to the right edge themselves */
:root:root body .rv-drawer,                                   /* the record page's Details / Notes / Documents drawer (ph-record-view.css) */
:root:root body #ss .bin-drawer,                              /* Recycle Bin (phstudio-app.css) */
:root:root body #trPageHost .phx-tr .trov .trdr:not(.tpx-drin):not(.tpx-qdin),   /* the task page's Comments / Attachments drawer (ph-task-page.css); not the copies docked inside a panel */
:root:root body .um-drw,                                      /* Users / Team members person panel (UserManagement.ascx) */
:root:root body #tm .tm-drawer,                               /* Portal Control Team members (TeamMembers.ascx) */
:root:root body .fpa-pnl,                                     /* People & access (fid-people-access.css) */
:root:root body #fadm.mts3 .ts-drw,                           /* Timesheets (fid-timesheets.css) */
:root:root body #fadm.bga .bga-dr,                            /* Manage Badges' New / Change badge panel (ph-badges-admin.css) - 2026-11-23: its head was under the title bar */
:root:root body .mep                                          /* the Me side panel (ph-me-panel.css) */
{
  top: calc(var(--ph-chrome-top) + var(--ph-panel-edge)) !important;
  right: var(--ph-panel-edge) !important;
  bottom: var(--ph-panel-edge) !important;
  height: auto !important;
  max-width: calc(100vw - 2 * var(--ph-panel-edge)) !important;
  border: 0 !important;
  border-radius: var(--ph-panel-r) !important;
  box-shadow: var(--ph-panel-shadow) !important;
  overflow: hidden;
}
/* the Address Book quick view and the panel beside it: only from 761px (under that they are their own full-window sheets) */
@media (min-width: 761px) {
  :root:root body #abApp .tblbox .drw,
  :root:root body #abApp .tblbox .sdp {
    top: calc(var(--ph-chrome-top) + var(--ph-panel-edge)) !important;
    right: var(--ph-panel-edge) !important;
    bottom: var(--ph-panel-edge) !important;
    height: auto !important;
    max-height: none !important;
    max-width: calc(100vw - 2 * var(--ph-panel-edge)) !important;
    border: 0 !important;
    border-radius: var(--ph-panel-r) !important;
    box-shadow: var(--ph-panel-shadow) !important;
    overflow: hidden;
  }
}

/* 2. Panels drawn inside a full-window layer (the layer is the dim, the panel sits at its right) */
:root:root body .ph-sidepop,                                  /* the shared side popup (ph-popup-side.css) */
:root:root body #tpxQdo.tpx-qdo,                              /* the Task page's quick view (ph-task-page.css) */
:root:root body #rvQdo                                        /* the record page's Notes / Documents quick view (ph-record-view.css) */
{
  top: calc(var(--ph-chrome-top)) !important;
  padding: var(--ph-panel-edge) !important;
  background: var(--ph-panel-dim) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
:root:root body .ph-sidepop > .ph-sidepop-box,
:root:root body #tpxQdo.tpx-qdo .tpx-sd,
:root:root body #rvQdo .tpx-sd {
  height: 100% !important;
  border-radius: var(--ph-panel-r) !important;
  box-shadow: var(--ph-panel-shadow) !important;
  overflow: hidden;
}
:root:root body .mxb-ndw,                                     /* the Meeting Board's notes panel (ph-meetings.js) */
:root:root body .ndx-dw                                       /* the forms' Record extras panel (ph-notes-docs.js, ph-client-popups.css) */
{ top: var(--ph-chrome-top) !important; }
:root:root body .ndx-dw .ndx-dsc { top: 0 !important; }
:root:root body #fadm.bga .bga-ovl { top: var(--ph-chrome-top) !important; }   /* 2026-11-23: Manage Badges' dim starts under the title bar */
:root:root body .mxb-ndw .mxb-nd,
:root:root body .ndx-dw .ndx-dp {
  top: var(--ph-panel-edge) !important;
  right: var(--ph-panel-edge) !important;
  bottom: var(--ph-panel-edge) !important;
  height: auto !important;
  max-width: calc(100% - 2 * var(--ph-panel-edge)) !important;
  border-radius: var(--ph-panel-r) !important;
  box-shadow: var(--ph-panel-shadow) !important;
  overflow: hidden;
}

/* panels that slide out of sight when closed: slide them past the 12px gap and the shadow too */
:root:root body #tm .tm-drawer:not(.is-open),
:root:root body .mxb-ndw:not(.open) .mxb-nd,
:root:root body .ndx-dw:not(.is-on) .ndx-dp { transform: translateX(calc(100% + 80px)); }

/* 3. Their dims start under the title bar, one colour */
:root:root body #abApp .drwbg,
:root:root body .rv-scrim,
:root:root body #ss .bin-scrim,
:root:root body #trPageHost .phx-tr .trov #tr-scrim,
:root:root body .um-scrim,
:root:root body #tm .tm-drawer-bg,
:root:root body .fpa-ovl,
:root:root body #fadm.mts3 .ts-scrim,
:root:root body .mep-ovl {
  top: var(--ph-chrome-top) !important;
  background: var(--ph-panel-dim) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}

/* 4. The Address Book quick view's inside, to the mockup: 88px tab rail, grey body under white cards, 44px footer buttons, 38px close */
@media (min-width: 761px) {
  :root:root body #abApp .tblbox .drw .qv-rail { width: 88px; flex: none; padding: 12px 8px; }
  :root:root body #abApp .tblbox .drw .qv-rail > button { border-radius: 12px; }
  :root:root body #abApp .tblbox .drw .qv-pane { background: var(--sffffff); }
  :root:root body #abApp .tblbox .drw .qv-foot { background: var(--sffffff); padding: 12px 16px; gap: 8px; }
  :root:root body #abApp .tblbox .drw .qv-close { width: 38px; height: 38px; }
}

/* 5. 2026-11-22 | Monique ("also not all of the popup are using the site's buttons!!"): the pop-ups' footer buttons take the site button (.ph-btn,
   ph-buttons.css - as PHPop's confirm uses): 42px, 10px corners, 15.5px, padding 0 20px; the second button white with the grey edge, the main one teal.
   Each pop-up keeps its own markup; only the look is brought in line. The ⋯ menus' items are left alone (direct footer buttons only).
   Covered: Address Book quick view footer, record pop-up footer + its drawers, Me panel footer, side-panel footers (.ndx-df), Referral fees dialog. */
:root:root body #abApp .tblbox .drw .qv-foot > .btn,
:root:root body #abApp .tblbox .drw .qv-foot > .qv-m > .btn,
:root:root body .rv-pfoot .rv-btn, :root:root body .rv-dfoot .rv-btn,
:root:root body .mep-f > .mep-btn,
:root:root body .ndx-df .btn,
:root:root body .rfz-bkf .rfz-btn {
  box-sizing: border-box !important; height: 42px !important; min-height: 42px !important; padding: 0 20px !important; border-radius: 10px !important;
  border: 1px solid var(--border, #DDE4E3) !important; background: var(--card, #fff) !important; color: var(--ink-muted, #56666B) !important;
  font: 400 15.5px/1 var(--font, 'IBM Plex Sans', system-ui, sans-serif) !important; gap: 8px; box-shadow: none !important; text-decoration: none !important;
}
:root:root body #abApp .tblbox .drw .qv-foot > .btn:hover, :root:root body #abApp .tblbox .drw .qv-foot > .qv-m > .btn:hover,
:root:root body .rv-pfoot .rv-btn:hover, :root:root body .rv-dfoot .rv-btn:hover, :root:root body .mep-f > .mep-btn:hover,
:root:root body .ndx-df .btn:hover, :root:root body .rfz-bkf .rfz-btn:hover {
  background: var(--acc-lite, #E6F4F5) !important; border-color: var(--acc, #0E7C86) !important; color: var(--acc, #0E7C86) !important;
}
/* the main button: teal */
:root:root body #abApp .tblbox .drw .qv-foot > .btn.pri, :root:root body #abApp .tblbox .drw .qv-foot > .qv-m > .btn.pri,
:root:root body .rv-pfoot .rv-btn--pri, :root:root body .rv-dfoot .rv-btn--pri,
:root:root body .ndx-df .btn.pri, :root:root body .rfz-bkf .rfz-btn.pri {
  background: var(--acc, #0E7C86) !important; border-color: var(--acc, #0E7C86) !important; color: var(--on-acc, #fff) !important;
}
:root:root body #abApp .tblbox .drw .qv-foot > .btn.pri:hover, :root:root body #abApp .tblbox .drw .qv-foot > .qv-m > .btn.pri:hover,
:root:root body .rv-pfoot .rv-btn--pri:hover, :root:root body .rv-dfoot .rv-btn--pri:hover,
:root:root body .ndx-df .btn.pri:hover, :root:root body .rfz-bkf .rfz-btn.pri:hover {
  background: var(--acc-ink, #0B5F68) !important; border-color: var(--acc-ink, #0B5F68) !important; color: #fff !important;
}
:root:root body .rv-pfoot .rv-btn svg, :root:root body #abApp .tblbox .drw .qv-foot > .btn svg, :root:root body .mep-f > .mep-btn svg, :root:root body .rfz-bkf .rfz-btn svg { width: 16px; height: 16px; }
:root:root body #abApp .tblbox .drw .qv-foot > .qv-fmore > summary.btn { box-sizing: border-box !important; width: 42px !important; height: 42px !important; min-height: 42px !important; padding: 0 !important; border-radius: 10px !important; border: 1px solid var(--border, #DDE4E3) !important; background: var(--card, #fff) !important; color: var(--ink-muted, #56666B) !important; }

/* 6. 2026-11-24 | Monique ("the popups don't have a white background like the other right side popups?" - in the record pop-up: the contact card,
   Comments, Time log / Files / Notes, the record quick view): every right side panel's body is white, as the Notes / Docs / extras panels are. The
   cards inside keep their own lines, so they still stand apart. Light theme only. */
:root:root:not([data-theme="dark"]) body .phx-tr .trov .trdr .trdrb:not(.over),
:root:root:not([data-theme="dark"]) body .phx-tr .trov .trdr.trdr-cm .trdrb:not(.over),
:root:root:not([data-theme="dark"]):not(.ph-m) body :is(#tpxQdo, #rvQdo, #rvNcd) :is(.trdrb, #rvTrDrB, .rv-ncb):not(.over),
:root:root:not([data-theme="dark"]) body #abApp .drw .qv-pane,
:root:root:not([data-theme="dark"]) body #abApp .tblbox .drw .qv-pane,
:root:root:not([data-theme="dark"]) body .rv-drawer :is(.rv-db, .rv-dbody, .rv-drb),
:root:root:not([data-theme="dark"]) body .ndx-dw .ndx-bd { background: #fff !important; }

/* 7. 2026-11-24 | Monique ("ALL MODAL FOOTERS MAKE SURE THAT THE BUTTON IS IN THE BOTTOM RIGHT", the workflow panel's "Review and save" sat in the middle):
   in every pop-up and side-panel footer the buttons are at the bottom right. Footers with text first (a save status, "Step 2 of 3", a note) keep the text
   on the left and the first button after it starts the right-hand group; footers of buttons only line them up on the right. A spacer a footer already
   has (.ph-pp-sp, .sp, .grow, .s) still does the same job. Page footers (the forms' Back / Next bar) are not touched. */
:root:root body :is(.ndx-dw .ndx-df, .ph-pp-foot, .modal-foot, .rv-pfoot, .rv-dfoot, .md-f, .pop2-foot, .pdx-foot, .ck-foot, .wfd-f, .se-pop-foot, .phf-foot, .pht2-f, .tmd-f,
  .qv-foot, .rv-rxpf, .mep-f, .rfz-bkf, .bga-f, .pdp-f, .wz-picker-foot, .rl-picker-foot, .pk-f, .pl-foot, .sg-foot, .sm-ft, .qn-f, .et-f, #tr-mod-f, .trdrf, .phas-f, .tm-foot, .pm-f) {
  justify-content: flex-end;
}
:root:root body :is(.ndx-dw .ndx-df, .ph-pp-foot, .modal-foot, .rv-pfoot, .rv-dfoot, .md-f, .pop2-foot, .pdx-foot, .ck-foot, .wfd-f, .se-pop-foot, .phf-foot, .pht2-f, .tmd-f,
  .qv-foot, .rv-rxpf, .mep-f, .rfz-bkf, .bga-f, .pdp-f, .wz-picker-foot, .rl-picker-foot, .pk-f, .pl-foot, .sg-foot, .sm-ft, .qn-f, .et-f, #tr-mod-f, .trdrf, .phas-f, .tm-foot, .pm-f)
  > :not(button, a, .btn, [class*="btn"], :has(> button, > a)) + :is(button, a, .btn, [class*="btn"], :has(> button, > a)) {
  margin-left: auto;
}
/* the workflow panel's own footer block (WorkflowEngine.js aboutFootHtml, .ab3w.ft) never grows or centres - it is the right-hand group */
:root:root body .ndx-dw .ndx-df > .ab3w.ft { flex: 0 0 auto !important; width: auto !important; margin-left: auto !important; display: inline-flex !important; justify-content: flex-end !important; }

/* 8. 2026-11-24 | Monique ("Update all the right side modal popups to look the same with the white background it should be shared"): ONE white look for
   every right side panel - the box, its head, its body and its footer are all white (--ph-panel-bg), split by one thin line (--ph-panel-line). Grey
   bodies (Me panel, Address Book quick view, record drawer, comments drawer), grey footers (side panels, Timesheets, pop-up footers) and tinted
   heads (Users panel) are gone. Cards inside keep their own edges, so they still stand apart. Status strips (red "now running", sun "missing",
   delete asks) keep their colour. Light theme only; dark keeps var(--card).
   A NEW right side panel: add its box to the list below (first block) - its direct parts turn white by themselves. */
:root { --ph-panel-bg: var(--sffffff); --ph-panel-line: var(--border, #E1E8E7); }
:root:root:not([data-theme="dark"]):not(.ph-m) body :is(
  .rv-drawer, #ss .bin-drawer, .phx-tr .trov .trdr, .um-drw, #tm .tm-drawer, .fpa-pnl, #fadm.mts3 .ts-drw, #fadm.bga .bga-dr, .mep,
  #abApp .tblbox .drw, #abApp .tblbox .sdp, .ph-sidepop > .ph-sidepop-box, #tpxQdo .tpx-sd, #rvQdo .tpx-sd, #rvNcd .tpx-sd, .mxb-ndw .mxb-nd, .ndx-dw .ndx-dp, #rvp .rv-rxr[open] > .rv-rxo
) {
  background: var(--ph-panel-bg) !important;
}
/* the panel's own parts (head, tabs, body, footer, rail, main) */
:root:root:not([data-theme="dark"]):not(.ph-m) body :is(
  .rv-drawer, #ss .bin-drawer, .phx-tr .trov .trdr, .um-drw, #tm .tm-drawer, .fpa-pnl, #fadm.mts3 .ts-drw, #fadm.bga .bga-dr, .mep,
  #abApp .tblbox .drw, #abApp .tblbox .sdp, .ph-sidepop > .ph-sidepop-box, #tpxQdo .tpx-sd, #rvQdo .tpx-sd, #rvNcd .tpx-sd, .mxb-ndw .mxb-nd, .ndx-dw .ndx-dp, #rvp .rv-rxr[open] > .rv-rxo
) > :not(button, a, input, select, textarea, label, svg, img, [hidden], .over, [class*="btn"], [class*="-ov"], [class*="drop"], [class*="scrim"], [class*="skel"],
         [class*="-sk"], [class*="band"], [class*="gaps"], [class*="ask"], [class*="confirm"], [class*="now"], [class*="toast"], [class*="menu"], [class*="tip"]),
/* bodies one level down, and footers / heads named by their own class */
:root:root:not([data-theme="dark"]):not(.ph-m) body :is(
  .mep-b, .mep-hd, .mep-tabs, .mep-f,
  #abApp .drw :is(.qv-main, .qv-pane, .qv-head, .qv-rail, .qv-foot, .sbf), #abApp .sdp :is(.sbb, .sbf),
  .rv-drawer :is(.rv-dbody, .rv-dbody.grey, .rv-dfoot, .rv-phead), #rvp .rv-rxo :is(.rv-rxph, .rv-rxpb, .rv-rxpf),
  .phx-tr .trov .trdr :is(.trdrb:not(.over), .trdrf), :is(#rvQdo, #rvNcd) :is(.sd-h, .trdrb:not(.over), .trdrf, #rvTrDrB, #rvTrDrF, .rv-ncb, .rv-ncf),
  .ph-sidepop-box :is(.ph-pp-head, .ph-pp-body, .ph-sidepop-body, .ph-pp-foot),
  .ndx-dw :is(.ndx-dh, .ndx-dh2, .ndx-bd, .ndx-df), .mxb-ndw :is(.mxb-ndh, .mxb-ndb, .mxb-ndf),
  .um-drw .um-dh, #fadm.mts3 .ts-drw .df, #ss .bin-drawer :is(.bin-drawer-h, .bin-drawer-b, .bin-drawer-f)
) {
  background: var(--ph-panel-bg) !important;
}

/* 9. 2026-11-24 | Monique (screenshot of the record page's Notes panel: "you need to make the header bar smaller and compact!"): ONE compact head
   for every right side panel - 12px 16px padding, 36px tile, 17px title, 12.5px line under it, 32px round close at the top right. Desktop only
   (the phone shell draws its own sheet heads). A NEW panel head goes into these lists. */
:root { --ph-panel-head-pad: 12px 14px 12px 16px; --ph-panel-tile: 36px; --ph-panel-title: 17px; --ph-panel-x: 32px; }
:root:root:not(.ph-m) body :is(#rvp .rv-rxph, .ndx-dw .ndx-dh, .ndx-dw .ndx-dh.ea-dh, .mxb-ndw .mxb-ndh, .ph-sidepop > .ph-sidepop-box > .ph-pp-head,
  #ss .bin-drawer-h, .um-drw .um-dh, .rv-drawer .rv-phead) {
  padding: var(--ph-panel-head-pad) !important; gap: 10px !important; min-height: 0 !important; align-items: center !important;
}
/* the tile / avatar on the left */
:root:root:not(.ph-m) body :is(#rvp .rv-rxph > .ic, .ndx-dw .ndx-dh > .ndx-ib:not(#_n#_n#_n#_n#_n#_n), .ndx-dw .ndx-dh > .ea-av:not(#_n)) {
  width: var(--ph-panel-tile) !important; height: var(--ph-panel-tile) !important; min-width: 0 !important; max-width: var(--ph-panel-tile) !important; flex: 0 0 var(--ph-panel-tile) !important; border-radius: 10px !important; padding: 0 !important;
}
:root:root:not(.ph-m) body .ndx-dw .ndx-dh > .ea-av:not(#_n) .in { font-size: 13px !important; border-radius: inherit !important; }
:root:root:not(.ph-m) body .ndx-dw .ndx-dh > .ea-av:not(#_n) .ty { width: 16px !important; height: 16px !important; right: -4px !important; bottom: -4px !important; }
:root:root:not(.ph-m) body .ndx-dw .ndx-dh > .ea-av:not(#_n) .ty svg { width: 9px !important; height: 9px !important; }
:root:root:not(.ph-m) body :is(#rvp .rv-rxph > .ic, .ndx-dw .ndx-dh > .ndx-ib:not(#_n#_n#_n#_n#_n#_n)) svg { width: 17px !important; height: 17px !important; }
:root:root:not(.ph-m) body #rvp .rv-rxph > .ic :is(img, .av, [class*="av"]) { width: 100% !important; height: 100% !important; font-size: 13px !important; border-radius: inherit !important; }
/* title + the line under it */
:root:root:not(.ph-m) body :is(#rvp .rv-rxph > .t, .ndx-dw .ndx-dh :is(.ndx-dt, h2), .mxb-ndw .mxb-ndh h2, .ph-sidepop > .ph-sidepop-box > .ph-pp-head :is(h2, .ph-pp-title), #ss .bin-drawer-t) {
  font-size: var(--ph-panel-title) !important; line-height: 1.25 !important; margin-top: 0 !important; gap: 1px !important;
}
:root:root:not(.ph-m) body :is(#rvp .rv-rxph > .t small, .ndx-dw .ndx-dh :is(.ndx-ds, .ea-dn), .mxb-ndw .mxb-ndh small) { font-size: 12.5px !important; margin-top: 0 !important; }
/* the round close */
:root:root:not(.ph-m) body :is(#rvp .rv-rxx, .ndx-dw .ndx-dh .ndx-dx, .mxb-ndw .mxb-ndh .x, .ph-sidepop > .ph-sidepop-box > .ph-pp-head .ph-pp-x) {
  width: var(--ph-panel-x) !important; height: var(--ph-panel-x) !important; min-width: 0 !important; align-self: center !important;
}
:root:root:not(.ph-m) body :is(#rvp .rv-rxx, .ndx-dw .ndx-dh .ndx-dx, .mxb-ndw .mxb-ndh .x) svg { width: 16px !important; height: 16px !important; }

/* 10. 2026-11-24 | Monique ("All have the same width?"): one width for every ordinary right side panel, 440px (was 480; first the Me panel's and the record page
   panels' width). The panels that hold a whole record keep their room: Address Book quick view, task / record quick views, the comments drawer and
   the large side pop-up (.ph-sidepop--lg). */
:root { --ph-panel-w: 480px; }   /* 11-24 later: "decrease the width a little" - was 480; 11-28 "increase the width a little bit" - 480 again */
@media (min-width: 561px) {
  :root:root body :is(.rv-drawer, #ss .bin-drawer, .um-drw, #tm .tm-drawer, .fpa-pnl, #fadm.mts3 .ts-drw, #fadm.bga .bga-dr, .mep,
    .ph-sidepop:not(.ph-sidepop--lg) > .ph-sidepop-box, .mxb-ndw .mxb-nd, .ndx-dw .ndx-dp, #rvp .rv-rxr[open] > .rv-rxo:not(#_n)) {
    width: min(var(--ph-panel-w), calc(100vw - 2 * var(--ph-panel-edge))) !important;
  }
}

/* 11. 2026-11-24 | Monique ("on all popups remove the stats except the plan summary & fees" - she picked "number tiles in panels"): inside every
   pop-up and right side panel the rows of number tiles are hidden - Contact persons (People / Next birthday / Incomplete / Preferences), Related
   parties (Linked / Incomplete / Companies / Not linked yet, and the older role tiles), the Address Book quick view's contact tiles, and the
   "As a referrer" numbers in the person pop-up. The role chips (All / Trustee ...) stay. The form PAGES keep their tiles. Plans summary
   (.pl3-tiles, .qp5-tiles) and Fees (.fs2-tot, .fb2-tiles, .qf5-tot) are not in this list, so they stay everywhere. */
:root:root body :is(.ndx-dw, #rvp .rv-rxo, #rvQdo, #rvNcd, #tpxQdo, .rv-drawer, #abApp .drw, #abApp .sdp, .ph-sidepop, .ph-centerpop, .ph-fullpop, .mxb-ndw, .mep)
  :is(.cp5-tiles, .xr6-tiles, .xr5-tiles, .c5-tiles),
:root.rv-inpop body #rvp :is(.cp5-tiles, .xr6-tiles, .xr5-tiles, .c5-tiles) { display: none !important; }   /* the record pop-up */
:root:root body .rpb-dlg :is(.rpb-stats, .rpb-sec:has(+ .rpb-stats)) { display: none !important; }

/* 12. 2026-11-24 | Monique ("make sure that the record popup's popups also have the compact header bar" - the Notes / Attachments): the record pop-up's
   and the task page's Notes / Attachments / Comments panels (#rvNcd, #rvQdo, #tpxQdo .sd-h: avatar, "Client · name", title, close) get section 9's
   compact head - 12px 14px 12px 16px, 36px tile, 17px title over the 12.5px "Client · name" line, 32px close. Desktop only. */
:root:root:not(.ph-m) body :is(#rvNcd, #rvQdo, #tpxQdo) .tpx-sd .sd-h:not(#_n#_n) { padding: var(--ph-panel-head-pad) !important; gap: 10px !important; min-height: 0 !important; align-items: center !important; }
:root:root:not(.ph-m) body :is(#rvNcd, #rvQdo, #tpxQdo) .tpx-sd .sd-h .sd-av:not(#_n#_n) { width: var(--ph-panel-tile) !important; height: var(--ph-panel-tile) !important; min-width: 0 !important; flex: 0 0 var(--ph-panel-tile) !important; border-radius: 10px !important; font-size: 13px !important; }
:root:root:not(.ph-m) body :is(#rvNcd, #rvQdo, #tpxQdo) .tpx-sd .sd-h .sd-av.is-rnd:not(#_n#_n) { border-radius: 50% !important; }
:root:root:not(.ph-m) body :is(#rvNcd, #rvQdo, #tpxQdo) .tpx-sd .sd-h .sd-av:not(#_n#_n) svg { width: 16px !important; height: 16px !important; }
:root:root:not(.ph-m) body :is(#rvNcd, #rvQdo, #tpxQdo) .tpx-sd .sd-h .sd-av .bdg:not(#_n#_n) { width: 16px !important; height: 16px !important; right: -4px !important; bottom: -4px !important; }
:root:root:not(.ph-m) body :is(#rvNcd, #rvQdo, #tpxQdo) .tpx-sd .sd-h .sd-av .bdg:not(#_n#_n) svg { width: 9px !important; height: 9px !important; }
:root:root:not(.ph-m) body :is(#rvNcd, #rvQdo, #tpxQdo) .tpx-sd .sd-h .sd-id:not(#_n#_n) { display: flex !important; flex-direction: column !important; gap: 1px !important; min-width: 0; flex: 1 1 0% !important; }
:root:root:not(.ph-m) body :is(#rvNcd, #rvQdo, #tpxQdo) .tpx-sd .sd-h h2:not(#_n#_n) { order: -1 !important; margin: 0 !important; font-size: var(--ph-panel-title) !important; line-height: 1.25 !important; }
:root:root:not(.ph-m) body :is(#rvNcd, #rvQdo, #tpxQdo) .tpx-sd .sd-h .sd-cr:not(#_n#_n) { font-size: 12.5px !important; margin: 0 !important; }
:root:root:not(.ph-m) body :is(#rvNcd, #rvQdo, #tpxQdo) .tpx-sd .sd-h .sd-x:not(#_n#_n) { width: var(--ph-panel-x) !important; height: var(--ph-panel-x) !important; min-width: 0 !important; align-self: center !important; }
:root:root:not(.ph-m) body :is(#rvNcd, #rvQdo, #tpxQdo) .tpx-sd .sd-h .sd-x:not(#_n#_n) svg { width: 16px !important; height: 16px !important; }

/* 13. 2026-11-25 | Monique ("the notes also have icons right in the top right - can you also add the same container look?" + "I want consistency across
   the site"): ONE icon container for every hover icon group in a card's top-right corner - the picker cards' (.rf6-ia / .cp5-ia, ph-picker-card.css,
   "like IMG 2"): a white pill (999px corners, 3px inside, 4px between, hairline #E1E8E7, soft shadow) holding 26px round white buttons with a hairline and
   a 13px symbol; teal on hover, red on Remove / Delete. Each group keeps its own place and its own show-on-hover. Covered here: file cards on every page
   (.phf-grid .phf-ac), the record's notes (.rv-nhb), the matter / task comments (.ck-own), the record page's cards (.rv-cha), the record's attachment
   cards (.phf-ia). A NEW corner icon group goes into these lists. */
:root:root body :is(.phf-grid .phf-ac, .rv-nhb, .ck-own, .ndz-nhb, #rvp .rv-cha, #abApp .mxb-dots):not(#_n#_n#_n#_n) {
  gap: 4px !important; padding: 3px !important; background: var(--sffffff) !important; border: 1px solid var(--le1e8e7) !important; border-radius: 999px !important;
  box-shadow: 0 6px 18px rgba(18, 52, 59, .10) !important; align-items: center;
}
:root:root body :is(.phf-grid .phf-ac, .rv-nhb, .ck-own, .ndz-nhb, #rvp .rv-cha, #abApp .mxb-dots) > :is(button, a):not(#_n#_n#_n#_n) {
  box-sizing: border-box; width: 26px !important; height: 26px !important; min-width: 26px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
  border: 1px solid var(--le1e8e7) !important; border-radius: 999px !important; background: var(--sffffff) !important; box-shadow: none !important; color: var(--i4f6a70) !important;
  display: grid !important; place-items: center; text-decoration: none; cursor: pointer;
}
:root:root body :is(.phf-grid .phf-ac, .rv-nhb, .ck-own, .ndz-nhb, #rvp .rv-cha, #abApp .mxb-dots) > :is(button, a) svg:not(#_n#_n#_n#_n) { width: 13px !important; height: 13px !important; }
:root:root body :is(.phf-grid .phf-ac, .rv-nhb, .ck-own, .ndz-nhb, #rvp .rv-cha, #abApp .mxb-dots) > :is(button, a):hover:not(#_n#_n#_n#_n) { border-color: #0B5C64 !important; color: var(--i0b5c64) !important; background: var(--seef6f6) !important; }
:root:root body :is(.phf-grid .phf-ac, .rv-nhb, .ck-own, .ndz-nhb, #rvp .rv-cha, #abApp .mxb-dots) > :is(.del, .dl, .rm, .danger, [data-rv="mx-fdel"], [data-rv="ct-unlink"], [title="Remove"], [title="Delete"]):hover:not(#_n#_n#_n#_n) {
  border-color: #D9A0A0 !important; color: var(--ia63d3d) !important; background: var(--sfdf0f0) !important;
}
/* touch screens show them all the time, flat, as the picker cards do */
@media (hover: none) {
  :root:root body :is(.phf-grid .phf-ac, .rv-nhb, .ck-own, .ndz-nhb, #rvp .rv-cha, #abApp .mxb-dots):not(#_n#_n#_n#_n) { box-shadow: none !important; }
}

/* 14. 2026-11-25 | Monique ("the other forms popups should match the record popup's popups"): the forms' side panel footer (.ndx-dw .ndx-df) - the save
   status on the left, then Close (new, ph-notes-docs.js .ndx-dfx) and the panel's own button at the right - at the record panels' size: 36px, 14px, 10px corners */
:root:root body .ndx-dw .ndx-df :is(.ndx-dfx, .xp-fbt, .rs3-b, .ph-btn):not(#_n#_n#_n#_n) { height: 36px !important; min-height: 36px !important; font-size: 14px !important; border-radius: 10px; }
:root:root body .ndx-dw .ndx-df .ndx-dfx:not(#_n#_n#_n#_n) { padding: 0 14px !important; border: 1px solid var(--ldde4e3) !important; background: var(--sffffff) !important; color: var(--i56666b) !important; box-shadow: none !important; }
:root:root body .ndx-dw .ndx-df .ndx-dfx:not(#_n#_n#_n#_n):hover { background: var(--se6f4f5) !important; border-color: #0E7C86 !important; color: var(--i0e7c86) !important; }
:root:root body .ndx-dw .ndx-df .rs3-split .rs3-b.m:not(#_n#_n#_n#_n) { border-radius: 10px 0 0 10px; }
:root:root body .ndx-dw .ndx-df .rs3-split .rs3-b.c:not(#_n#_n#_n#_n) { border-radius: 0 10px 10px 0; width: 34px !important; }

/* 15. 2026-11-25 | Monique (forms Notes / Documents panels to match the record's): every file card's pill reads Open, Download, Delete (the forms' cards
   come as Remove, Download, Open); the forms' Notes get the record's top bar (Search notes + Show), kept at the top of the panel while the notes scroll;
   a note the bar filters out steps aside. The forms' note corner icons (.ndz-nhb) are in section 13's pill list. */
:root:root body .phf-grid .phf-ac > [title="Open"]:not(#_n#_n#_n) { order: 1; }
:root:root body .phf-grid .phf-ac > [download]:not(#_n#_n#_n) { order: 2; }
:root:root body .phf-grid .phf-ac > :is(.danger, .dl, [title="Remove"], [title="Delete"]):not(#_n#_n#_n) { order: 3; }
:root:root body .ndx-dw .ndz-chat > .ndz-nqbar:not(#_n#_n#_n) { position: sticky; top: -18px; z-index: 4; display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 0 0 10px; background: var(--sffffff); }
:root:root body .ndx-dw .ndz-nqbar .ndz-qsf:not(#_n#_n#_n) { flex: 1 1 auto; min-width: 0; }
:root:root body .ndx-dw .ndz-chat .ndz-nb[hidden]:not(#_n#_n#_n) { display: none !important; }

/* 16. 2026-11-25 | Monique ("the popups on the form are not looking like the record popup's popups" - the Related parties panel, measured side by side):
   the forms' panel head = the record's - 17px title (a form rule made it 18 / 20), the round close on its grey (#F1F3F2) circle */
:root:root body:not(#_n) .ndx-dw .ndx-dh :is(.ndx-dt, h2):not(#_n#_n#_n#_n) { font-size: 17px !important; line-height: 1.25 !important; }
:root:root body .ndx-dw .ndx-dh .ndx-dx:not(#_n#_n#_n#_n) { background: var(--sf1f3f2) !important; color: var(--i4f6a70) !important; }
:root:root body .ndx-dw .ndx-dh .ndx-dx:not(#_n#_n#_n#_n):hover { background: var(--se1e8e7) !important; color: var(--i12343b) !important; }

/* 17. 2026-11-25 | Monique (forms Related parties, 2 parties: "why is there 2 borders" + the line read "A & J Share Trust · Client · A & J Share Trust"):
   - the forms' Related parties carousel box (.xr5-car > .xcar, ph-client-popups.css) drew a border round the shared picker card, which has its own: the
     box goes flat, the card keeps its one border and 16px corners - as the record's picker cards;
   - an older rule put the record's name in front of a panel's line (.ndx-ds[data-ea-nm]::before); the line now says "Client · <name>" itself (ph-notes-docs.js
     whoLine), so the prefix goes; an empty line still shows the name alone. */
:root:root body .xr5--car .xr5-car > .xcar:not(#_n#_n#_n) { border: 0 !important; border-radius: 0 !important; overflow: visible !important; background: none !important; }
:root:root body .xr5--car .xr5-car > .xcar .pl3-nav:not(#_n#_n#_n) { border-top: 0 !important; padding: 10px 0 0 !important; }
:root:root body .ndx-dw .ndx-ds[data-ea-nm]:not(:empty):not(#_n#_n#_n)::before { content: none !important; }
:root:root body .xr5--car .xr5-car > .xcar .xr5-cd.rf6:not(#_n#_n#_n) { border: 1px solid var(--le1e8e7) !important; border-radius: 16px !important; background: var(--sffffff) !important; }

/* 18. 2026-11-25 | Monique ("go and check if they have the same popups" - every panel measured live, record vs form, A & J Share Trust):
   - the forms' Contact persons and Notes panels had their footer hidden (older rules: a panel with the Contact persons bar .cp4-ft or the Notes writing box
     .ndz-chat had no .ndx-df) - the footer shows again: save status, Close, and (Contact persons) the bar's Add contact person ▾, moved into the footer by the
     footer helper (ph-notes-docs.js SRC), as the record's "Close + Add contact ▾"; the bar itself goes once its buttons are in the footer;
   - the record's Notes / Attachments panels (#rvQdo / #rvNcd .tpx-sd) were 520px with a bare close: 440px like every other panel, the close on its grey circle */
:root:root body:not(#_n) .ndx-dw .ndx-dp:is(:has(.rp3--side), :has(.cp4-ft), :has(.ndz-chat)) > .ndx-df:not(#_n#_n#_n#_n) { display: flex !important; }
:root:root body:not(#_n) .ndx-dw.ndx-docked .ndx-bd .cp4-ft:not(#_n#_n#_n#_n) { display: none !important; }
@media (min-width: 561px) {
  :root:root body :is(#rvQdo, #rvNcd, #tpxQdo) .tpx-sd:not(#_n#_n#_n) { width: min(var(--ph-panel-w, 480px), calc(100vw - 24px)) !important; max-width: var(--ph-panel-w, 480px) !important; margin-left: auto !important; }
}
:root:root body :is(#rvQdo, #rvNcd, #tpxQdo) .tpx-sd .sd-h .sd-x:not(#_n#_n#_n) { background: var(--sf1f3f2) !important; color: var(--i4f6a70) !important; border-radius: 50% !important; }
:root:root body :is(#rvQdo, #rvNcd, #tpxQdo) .tpx-sd .sd-h .sd-x:not(#_n#_n#_n):hover { background: var(--se1e8e7) !important; color: var(--i12343b) !important; }

/* 19. 2026-11-25 | Monique ("the popups on the matter / general task page does not match"): the task page's Comments / Attachments / Folders & links panel
   (#tpxQdo) - 440px (section 18), the search strip (ph-rx-search.css), and the record panels' footer (ph-task-page.js #tpxPf): white, a line over it,
   Close at the bottom right, Attachments' Add files - 36px buttons */
:root:root body #tpxQdo .tpx-sd .sd-main > .tpx-rxpf:not(#_n#_n#_n) { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--le1e8e7); background: var(--sffffff); }
:root:root body #tpxQdo .tpx-rxpf :is(.rv-rxpf-x, .rv-rxpf-a):not(#_n#_n#_n) { box-sizing: border-box; height: 36px; min-height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; box-shadow: none; }
:root:root body #tpxQdo .tpx-rxpf .rv-rxpf-x:not(#_n#_n#_n) { border: 1px solid var(--ldde4e3); background: var(--sffffff); color: var(--i56666b); }
:root:root body #tpxQdo .tpx-rxpf .rv-rxpf-x:not(#_n#_n#_n):hover { background: var(--se6f4f5); border-color: #0E7C86; color: var(--i0e7c86); }
:root:root body #tpxQdo .tpx-rxpf .rv-rxpf-a svg { width: 15px; height: 15px; }
:root:root body #tpxQdo .tpx-sd .sd-main { display: flex; flex-direction: column; }
:root:root body #tpxQdo .tpx-sd .sd-main > .qd-b { flex: 1 1 auto; min-height: 0; }
/* 2026-11-25 (task page Comments: "the header bar colors etc"): the head's tile is the panel's icon tile (ph-task-page.js .tpx-ptile) - 36px square, 10px
   corners, Comments in the sun note tint, Attachments / Folders & links in teal - as the record and the forms panels; no ring. The close keeps no focus ring
   from being opened (a keyboard focus still shows one). */
:root:root body #tpxQdo .tpx-sd .sd-h .sd-av.tpx-ptile:not(#_n#_n#_n#_n) { width: 36px !important; height: 36px !important; flex: 0 0 36px !important; border-radius: 10px !important; box-shadow: none !important; border: 0 !important; display: grid !important; place-items: center; padding: 0 !important; }
:root:root body #tpxQdo .tpx-sd .sd-h .sd-av.tpx-ptile.is-notes:not(#_n#_n#_n#_n) { background: var(--sfdf3cc) !important; color: var(--i8a5a00) !important; }
:root:root body #tpxQdo .tpx-sd .sd-h .sd-av.tpx-ptile.is-docs:not(#_n#_n#_n#_n) { background: var(--se3f1f2) !important; color: var(--i0b5c64) !important; }
:root:root body #tpxQdo .tpx-sd .sd-h .sd-av.tpx-ptile svg:not(#_n#_n#_n#_n) { width: 18px !important; height: 18px !important; }
:root:root body #tpxQdo .tpx-sd .sd-h .sd-av.tpx-ptile :is(.sd-badge, .bdg, .n):not(#_n#_n#_n#_n) { display: none !important; }
:root:root body :is(#tpxQdo, #rvQdo, #rvNcd) .tpx-sd .sd-h .sd-x:focus:not(:focus-visible):not(#_n#_n#_n) { outline: none !important; box-shadow: none !important; }
/* 2026-11-25 | Monique (empty Documents on the Matter form: "DUPLICATION OF BUTTONS" - Close, Add files, Choose files): when the panel's own button is in the
   footer already (the empty shell's "Choose files", moved there by the footer helper, .ndx-docked), the footer's own "Add files" (.ndx-dfadd) steps aside -
   one add button, as on the record */
:root:root body .ndx-dw.ndx-docked .ndx-df .ndx-dfadd:not(#_n#_n#_n#_n) { display: none !important; }
/* 2026-11-25 | Monique (task page Comments: "the header bar is squashed just fix that"): a long feed pushed on the panel's column and the head shrank to
   30px (its tile and title spilling out of it) - the head, the search bar and the footer keep their own height; only the list scrolls. In the line
   under the title the kind ("General task", "Matter") stays whole and the name gives way. */
:root:root body :is(#rvNcd, #rvQdo, #tpxQdo) .tpx-sd :is(.sd-h, .sd-bar, .rv-rxpf):not(#_n#_n#_n#_n) { flex-shrink: 0 !important; }
:root:root body #tpxQdo .sd-cr > span:first-child:not(:last-child):not(#_n#_n#_n#_n) { flex: none !important; }
:root:root body #tpxQdo .sd-cr > span:last-child:not(#_n#_n#_n#_n) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* 20. 2026-11-26 | Monique ("The creation of a new form via a popup, the modal footer ... should be using the popups of our site's modal footer, and
   then you can still add the draft etc logic just into that modal footer"): inside the Create-new popup (html.pcf-wzpop - client, contact, related party,
   will, ANC, plan, general task, event) the form's Back / Next bar IS the pop-up footer the record pop-up has (.rv-pfoot): one flat white bar across the
   bottom of the popup, 12px 24px, a hairline on top and the soft upward shadow - no floating rounded card. Its buttons are the pop-up footer buttons of
   section 5 (42px, 10px corners, 15.5px - :not(#_n...) beats the forms' 12.5px FormHost rule in ph-client-popups.css; Back white with the grey edge, the main one teal). The draft status (.formbar-sv / the General Task's
   [data-nt-fs]) and its hover tip stay at the left, the buttons at the bottom right (section 7). The form pages keep their footer card; phones
   (760px and under) keep ph-form-phone's bar. The form scrolls clear of the bar (88px at the bottom of the page). */
@media (min-width: 761px) {
  html.pcf-wzpop.pcf-wzpop body :is(#ss, #phPageHost, body) .pcf-foot.pcf-foot {
    position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important; width: auto !important; max-width: none !important;
    z-index: 40 !important; margin: 0 !important; display: flex !important; align-items: center !important; flex-wrap: nowrap !important; gap: 10px !important;
    padding: 12px 24px !important; border: 0 !important; border-top: 1px solid var(--border, #E1E8E7) !important; border-radius: 0 !important;
    background: var(--card, #fff) !important; backdrop-filter: none !important; box-shadow: 0 -6px 18px rgba(18, 52, 59, .06) !important;
    overflow: visible !important; justify-content: flex-end !important; min-height: 0 !important; height: auto !important;
  }
  html.pcf-wzpop.pcf-wzpop body .pcf-foot.pcf-foot .pcf-pg { display: none !important; }
  html.pcf-wzpop.pcf-wzpop body .pcf-foot.pcf-foot > :is(.formbar-sv, .pcf-fs, .lf-left, [data-nt-fs]) { order: -1; margin-right: auto !important; }
  /* 2026-11-30 | Monique ("fix the modal footer of an event form" - the New event pop-up showed Delete, Yes delete it, This one and the ones after, Keep
     it, Back and Create event all at once): the button rule below forced display on every footer button, so a button the form keeps hidden ([hidden])
     showed anyway. A hidden one stays hidden - for every form opened in this pop-up. */
  html.pcf-wzpop.pcf-wzpop body .pcf-foot.pcf-foot [hidden]:not(#_n#_n#_n#_n#_n) { display: none !important; }
  /* the buttons: the pop-up footer buttons (section 5) */
  html.pcf-wzpop.pcf-wzpop body .pcf-foot.pcf-foot .pcf-btn:not(.lf-quiet):not(.lf-fix):not(#_n#_n#_n#_n) {
    box-sizing: border-box !important; display: inline-flex !important; align-items: center !important; justify-content: center; flex: none !important;
    height: 42px !important; min-height: 42px !important; padding: 0 20px !important; border-radius: 10px !important; gap: 8px !important;
    border: 1px solid var(--border, #DDE4E3) !important; background: var(--card, #fff) !important; color: var(--ink-muted, #56666B) !important;
    font: 400 15.5px/1 var(--font, 'IBM Plex Sans', system-ui, sans-serif) !important; box-shadow: none !important; text-decoration: none !important; white-space: nowrap;
  }
  html.pcf-wzpop.pcf-wzpop body .pcf-foot.pcf-foot .pcf-btn:not(.lf-quiet):not(.lf-fix):not(#_n#_n#_n#_n):hover {
    background: var(--acc-lite, #E6F4F5) !important; border-color: var(--acc, #0E7C86) !important; color: var(--acc, #0E7C86) !important;
  }
  html.pcf-wzpop.pcf-wzpop body .pcf-foot.pcf-foot .pcf-btn.pcf-btn--pri:not(.lf-quiet):not(#_n#_n#_n#_n) {
    background: var(--acc, #0E7C86) !important; border-color: var(--acc, #0E7C86) !important; color: var(--on-acc, #fff) !important;
  }
  html.pcf-wzpop.pcf-wzpop body .pcf-foot.pcf-foot .pcf-btn.pcf-btn--pri:not(.lf-quiet):not(#_n#_n#_n#_n):hover {
    background: var(--acc-ink, #0B5F68) !important; border-color: var(--acc-ink, #0B5F68) !important; color: #fff !important;
  }
  html.pcf-wzpop.pcf-wzpop body .pcf-foot.pcf-foot .pcf-btn.pcf-btn--pri:is(:disabled, [aria-disabled="true"]):not(#_n#_n#_n#_n) {
    background: #9DBABD !important; border-color: #9DBABD !important; color: #fff !important; cursor: not-allowed;
  }
  html.pcf-wzpop.pcf-wzpop body .pcf-foot.pcf-foot .pcf-btn.mxm-del:not(#_n#_n#_n#_n) { color: var(--red-ink, var(--i8f2f2f)) !important; }
  html.pcf-wzpop.pcf-wzpop body .pcf-foot.pcf-foot .pcf-btn svg { width: 16px; height: 16px; flex: none; }
  /* the draft status reads at the footer's size, its tip opens above the bar */
  html.pcf-wzpop.pcf-wzpop body .pcf-foot.pcf-foot :is(.formbar-sv, [data-nt-fs]) { font-size: 13.5px; }
  html.pcf-wzpop.pcf-wzpop body .ph-page { padding-bottom: 88px !important; }
}

/* 21. 2026-11-28 | Monique (screenshot of the new Folders & links panel: "the content inside to be this greyish color ... update the empty shell on the
   rest of the popup to also match ... and make the popup wider"): the matter / step / general task side panel (#tpxQdo) and the record's (#rvQdo) -
   Comments, Activity, Documents, Folders & links, Events - are 560px wide (other right side panels keep --ph-panel-w); their content sits on the
   grey panel ground (#F7F9F8) with each group in a white box, the head and the foot stay white; and every empty state is drawn like the Folders &
   links one - no box behind it, the picture, a 21px title, a 15px line, its "Start with" / "Try" rows as white pill chips. Light theme only. */
:root { --ph-drawer-w: 560px; --ph-drawer-bg: var(--sf7f9f8); }
@media (min-width: 561px) {
  :root:root body :is(#rvQdo, #tpxQdo) .tpx-sd:not(#_n#_n#_n#_n) { width: min(var(--ph-drawer-w), calc(100vw - 24px)) !important; max-width: var(--ph-drawer-w) !important; }
}
/* the grey ground: the body, the panel docked in it and its scrolling part (heads, tabs and the foot with the writing box stay white) */
:root:root:not([data-theme="dark"]) body :is(#tpxQdo, #rvQdo) .tpx-sd .sd-main > .qd-b:not(#_n#_n),
:root:root:not([data-theme="dark"]) body :is(#tpxQdo, #rvQdo) .tpx-sd .qd-b > :is(#tr-dr, #rvTrDr):not(#_n#_n),
:root:root:not([data-theme="dark"]) body :is(#tpxQdo, #rvQdo) .tpx-sd .qd-b :is(#tr-dr, #rvTrDr) > .trdrb:not(.over):not(#_n#_n),
:root:root:not([data-theme="dark"]) body :is(#tpxQdo, #rvQdo) .tpx-sd .qd-b > #rvTrDrB:not(#_n#_n),
:root:root:not([data-theme="dark"]) body :is(#tpxQdo, #rvQdo) .tpx-sd .qd-b .cmfd-host:not(.cmfd-cmpf):not(#_n#_n) { background: var(--ph-drawer-bg) !important; }
/* 2026-12-02 | Monique ("remove the box shadow from the post"): the slot that holds the writing box in the foot also carries .cmfd-host, so it took
   the grey ground and showed as a grey band round the box - the foot is white, the slot has no ground of its own */
/* Activity's days and Events' list: a white box per group, as the comments and folders & links have */
:root:root:not([data-theme="dark"]) body :is(#tpxQdo, #rvQdo) .tpx-sd .ck-feed > .ck-hist:not(#_n#_n),
:root:root:not([data-theme="dark"]) body #tpxQdo .tpx-sd #tpxQdB > .fold.evl:not(#_n#_n) {
  background: #fff !important; border: 1px solid #E1E8E7 !important; border-radius: 16px !important; padding: 4px 14px !important; margin: 0 0 12px !important;
}
:root:root:not([data-theme="dark"]) body #tpxQdo .tpx-sd #tpxQdB > .fold.evl .fo:not(#_n#_n) { background: transparent !important; border: 0 !important; border-bottom: 1px solid #EEF1F0 !important; border-radius: 0 !important; box-shadow: none !important; }
:root:root:not([data-theme="dark"]) body #tpxQdo .tpx-sd #tpxQdB > .fold.evl .fo:last-child:not(#_n#_n) { border-bottom: 0 !important; }

/* empty states: the Documents drop area (.phf-dz), the Comments / Activity chat picture (.phf-ch), the comment feed's own (.phc-emp) - the
   Folders & links shell's look: centred in the panel, no box behind, 21px title, 15px line, pill chips */
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) :is(.phf-dz, .phf-ch):not(#_n#_n#_n) {
  background: none !important; box-shadow: none !important; border-radius: 0 !important; min-height: 100% !important; flex: 1 1 auto !important;
  justify-content: center !important; gap: 0 !important; padding: 24px 10px !important;
}
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) :is(.phf-dz, .phf-ch) h3:not(#_n#_n#_n) { margin: 18px 0 0 !important; font-size: 21px !important; line-height: 1.25 !important; }
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) :is(.phf-dz, .phf-ch) p:not(#_n#_n#_n) { margin: 8px 0 0 !important; max-width: 46ch !important; font-size: 15px !important; line-height: 1.55 !important; color: var(--i4f6a70) !important; }
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) .phf-ch .phf-ch-chat:not(#_n#_n#_n) { zoom: 1 !important; margin: 0 !important; }
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) .phf-dz .phf-dz-fan:not(#_n#_n#_n) { margin: 0 0 6px !important; }
/* "Start with": a row of white pill chips, its word in front, like Folders & links' "Try" */
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) .phf-ch .phf-ch-st:not(#_n#_n#_n) { flex-direction: row !important; flex-wrap: wrap !important; justify-content: center !important; align-items: center !important; gap: 6px !important; max-width: 460px !important; margin: 14px 0 0 !important; }
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) .phf-ch .phf-ch-st > span:not(#_n#_n#_n) { font-size: 12px !important; color: var(--i4f6a70) !important; margin-right: 2px !important; }
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) .phf-ch .phf-ch-st button:not(#_n#_n#_n) {
  width: auto !important; height: 30px !important; padding: 0 12px 0 4px !important; gap: 6px !important; border: 1px solid var(--ld5dedd) !important; border-radius: 999px !important;
  background: var(--sffffff) !important; font-size: 12.5px !important; line-height: 1 !important; white-space: nowrap !important; color: var(--i12343b) !important;
}
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) .phf-ch .phf-ch-st button:hover:not(#_n#_n#_n) { border-color: #0E7C86 !important; color: var(--i0b5c64) !important; }
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) .phf-ch .phf-ch-st .si:not(#_n#_n#_n) { width: 22px !important; height: 22px !important; border-radius: 50% !important; }
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) .phf-ch .phf-ch-pv:not(#_n#_n#_n) { margin-top: 14px !important; font-size: 12px !important; }
/* the Documents drop area's alt buttons (where shown) as the same chips */
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) .phf-dz .phf-dz-alt:not(#_n#_n#_n) { margin-top: 14px !important; }
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) .phf-dz .phf-dz-alt button:not(#_n#_n#_n) { height: 30px !important; border: 1px solid var(--ld5dedd) !important; border-radius: 999px !important; font-size: 12.5px !important; }
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) .phf-dz .phf-dz-pick:not(#_n#_n#_n) { margin-top: 16px !important; border-radius: 12px !important; }
/* the scrolling parts let an empty state fill them, so it sits in the middle like the Folders & links one */
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) :is(.trdrb, #rvTrDrB, .cmfd-host, .phc-list):has(> :is(.phf-dz, .phf-ch, .phc-emp)):not(#_n#_n) { display: flex !important; flex-direction: column !important; min-height: 100% !important; flex: 1 1 auto !important; }
/* the comment feed's own small empty line, when it shows instead of the picture */
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) .phc-emp:not(#_n#_n#_n) { flex: 1 1 auto !important; justify-content: center !important; padding: 40px 10px !important; background: none !important; border: 0 !important; }
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) .phc-emp b:not(#_n#_n#_n) { font-family: "Bricolage Grotesque", system-ui, sans-serif !important; font-size: 21px !important; font-weight: 400 !important; }
:root:root body :is(#tpxQdo, #rvQdo, .ndx-dw) .phc-emp > span:last-child:not(#_n#_n#_n) { font-size: 15px !important; color: var(--i4f6a70) !important; max-width: 46ch !important; }
/* an empty panel has nothing to search: no search bar, as Folders & links */
:root:root body :is(#tpxQdo, #rvQdo) .sd-main:has(.qd-b :is(.phf-rs, .phf-dz, .phf-ch, .phc-emp:not(.phc-nomatch))) > .sd-bar:not(#_n#_n) { display: none !important; }   /* 2026-11-29: a search with no match keeps its bar (.phc-nomatch), or it could not be cleared */
/* 2026-11-28 later | Monique ("the empty shells are not centered like the folders etc for the other popups"): every box between the panel body and an
   empty shell stretches (the comment feed's host and list too - the picture sits two levels inside them), and the shell centres itself in what is
   left above the foot - Comments, Activity, Documents, Events, as Folders & links. Checked live on a step: centres within 10px. */
:root:root body :is(#tpxQdo, #rvQdo) .sd-main > .qd-b:has(.phf-rs, .phf-dz, .phf-ch, .phc-emp):not(#_n#_n) { display: flex !important; flex-direction: column !important; }
:root:root body :is(#tpxQdo, #rvQdo) .qd-b :is(#tr-dr, #rvTrDr, .trdrb, #rvTrDrB, .cmfd-host, .phc-list):has(.phf-rs, .phf-dz, .phf-ch, .phc-emp):not(#_n#_n) { display: flex !important; flex-direction: column !important; flex: 1 0 auto !important; min-height: 0 !important; }
:root:root body :is(#tpxQdo, #rvQdo) .qd-b :is(.phf-rs:not(.rs-sm), .phf-dz, .phf-ch, .phc-emp):not(#_n#_n#_n) { flex: 1 0 auto !important; min-height: 0 !important; justify-content: center !important; margin-top: 0 !important; }
/* 2026-11-29 | Monique ("the task popup empty shell is not centered like the rest" - the matter / record page): the record's own side panels (#rvp
   .rv-rxr > .rv-rxo - Tasks, Events, Time log, Activity, the people panels) follow the same rules as Comments / Documents / Folders & links: 560px wide,
   the content on the grey panel ground, and an empty shell (.rv-xs, the record's picture shell) centred in the body. Checked live on Karin Hopkinson. */
@media (min-width: 561px) {
  :root:root body #rvp .rv-rxr[open] > .rv-rxo:not(#_n#_n#_n) { width: min(var(--ph-drawer-w, 560px), calc(100vw - 24px)) !important; max-width: var(--ph-drawer-w, 560px) !important; }
}
:root:root:not([data-theme="dark"]) body #rvp .rv-rxr[open] > .rv-rxo > .rv-rxpb:not(#_n#_n#_n) { background: var(--ph-drawer-bg, #F7F9F8) !important; }
:root:root body #rvp .rv-rxr[open] > .rv-rxo > .rv-rxpb:has(> :is(.rv-xs, .phf-rs, .phf-dz, .phf-ch)):not(#_n#_n#_n) { flex-direction: column !important; justify-content: center !important; }
:root:root body #rvp .rv-rxr[open] > .rv-rxo > .rv-rxpb > :is(.rv-xs, .phf-rs):not(#_n#_n#_n) { margin-top: auto !important; margin-bottom: auto !important; }
/* 22. 2026-11-29 | Monique ("make sure that the comments and documents on the forms also matches"): the forms' Comments and Documents side panels
   (ph-notes-docs.js inside .ndx-dw - Client, Contact, Related party, Will, ANC, Plan) laid out as the record's: the grey panel ground, the search bar
   as a white strip on top, the list scrolling in between (day pills, white "This client" boxes), and the writing box / the drop bar white at the foot.
   The empty pictures (.phf-ch / .phf-dz) take the record panel's rules above (section "empty states", now with .ndx-dw). */
:root:root body .ndx-dw .ndx-bd:has(> :is(.ndz-phc, .ndz-dfeed)):not(#_n#_n#_n) { display: flex !important; flex-direction: column !important; padding: 0 !important; overflow: hidden !important; }
:root:root:not([data-theme="dark"]) body .ndx-dw .ndx-bd:has(> :is(.ndz-phc, .ndz-dfeed)):not(#_n#_n#_n) { background: #F7F9F8 !important; }
:root:root body .ndx-dw .ndx-bd > :is(.ndz-phc, .ndz-dfeed):not(#_n#_n#_n) { flex: 1 1 auto !important; min-height: 0 !important; display: flex !important; flex-direction: column !important; gap: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
:root:root body .ndx-dw .ndz-phc > .ndz-phcf:not(#_n#_n#_n) { flex: 1 1 auto !important; min-height: 0 !important; display: flex !important; flex-direction: column !important; margin: 0 !important; }
html :is(#ss, body) .ndx-dw .ndx-bd :is(.ndz-phc .phc-bar, .ndz-dfeed > .ndz-qbar.ndz-dfbar):not(#_n#_n#_n#_n#_n) { position: relative !important; top: auto !important; flex: none !important; display: flex !important; align-items: center !important; gap: 8px !important; margin: 0 !important; padding: 12px 20px !important; background: var(--sffffff) !important; border: 0 !important; border-bottom: 1px solid var(--ldde4e3) !important; }
/* the comment feed's search field as the record bar's (ph-rx-search.css): 38px, #F4F7F7, no edge until you type */
html :is(#ss, body) .ndx-dw .ndz-phc .phc-bar .phc-q:not(#_n#_n#_n#_n#_n) { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; box-sizing: border-box; height: 38px !important; margin: 0 !important; padding: 0 10px 0 12px !important; border: 1px solid transparent !important; border-radius: 10px !important; background: var(--sf4f7f7) !important; color: var(--i8a989c) !important; box-shadow: none !important; }
html :is(#ss, body) .ndx-dw .ndz-phc .phc-bar .phc-q:focus-within:not(#_n#_n#_n#_n#_n) { background: var(--sffffff) !important; border-color: #0E7C86 !important; }
html :is(#ss, body) .ndx-dw .ndz-phc .phc-bar .phc-q input:not(#_n#_n#_n#_n#_n) { flex: 1 1 0; min-width: 0; height: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; outline: 0; box-shadow: none !important; background: transparent !important; font: 400 14px "IBM Plex Sans", sans-serif !important; color: var(--i12343b) !important; }
html :is(#ss, body) .ndx-dw .ndz-phc .phc-bar .phc-q svg:not(#_n#_n#_n#_n#_n), html :is(#ss, body) .ndx-dw .ndz-qbar .ndz-qsf svg:not(#_n#_n#_n#_n#_n) { position: static !important; flex: none; }   /* the old absolute icon sat on the words ("Search" under the glass) */
:root:root body .ndx-dw :is(.ndz-phc .phc-list, .ndz-dfeed > .ndz-dfl):not(#_n#_n#_n) { flex: 1 1 auto !important; min-height: 0 !important; overflow-y: auto !important; overscroll-behavior: contain; margin: 0 !important; padding: 12px 20px !important; scrollbar-width: thin; }
:root:root body .ndx-dw .ndz-phc .phc-cmp:not(#_n#_n#_n) { flex: none !important; margin: 0 !important; padding: 12px 20px !important; background: var(--sffffff) !important; border-top: 1px solid var(--le1e8e7) !important; }
/* nothing yet: no search bar (nothing to search), as the record */
html :is(#ss, body) .ndx-dw .ndx-bd .ndz-phc:has(.phf-ch, .phc-emp:not(.phc-nomatch)) .phc-bar:not(#_n#_n#_n#_n#_n#_n) { display: none !important; }
:root:root body .ndx-dw .ndx-bd > .ndz-files:has(> .ndz-dzw):not(#_n#_n#_n) { flex: 1 1 auto !important; }
:root:root body .ndx-dw .ndz-files > .ndz-dzw:not(#_n#_n#_n) { flex: 1 1 auto !important; display: flex !important; flex-direction: column !important; min-height: 100% !important; }
/* the box's head ("This client") and the drop bar - the record's .tr5-dropbar (white, a hairline above, the dashed inner edge) */
:root:root body .ndx-dw .ndz-phc .ndz-cmgt:not(#_n#_n#_n) { font-size: 13px; color: var(--i12343b); }
:root:root body .ndx-dw .ndz-dfeed > .ndz-dbar:not(#_n#_n#_n) { position: relative; flex: none !important; display: flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important; min-height: 92px; box-sizing: border-box; margin: 0 !important; padding: 12px 20px 16px !important; background: var(--sffffff) !important; border-top: 1px solid var(--le1e8e7) !important; font-size: 12.5px; color: var(--i4f6a70); }
:root:root body .ndx-dw .ndz-dfeed > .ndz-dbar::before { content: ""; position: absolute; inset: 12px 20px 16px; border: 1px dashed var(--ld5dedd); border-radius: 12px; pointer-events: none; }
:root:root body .ndx-dw .ndz-dfeed > .ndz-dbar.is-over::before { border-color: #0E7C86; background: rgba(14, 124, 134, .06); }
:root:root body .ndx-dw .ndz-dfeed > .ndz-dbar > svg { color: var(--i0e7c86); flex: none; }
:root:root body .ndx-dw .ndz-dfeed > .ndz-dbar .lnkb:not(#_n#_n#_n) { position: relative; height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 2px !important; border: 0 !important; background: none !important; box-shadow: none !important; font: inherit !important; font-size: 12.5px !important; color: var(--i0e7c86) !important; text-decoration: underline !important; cursor: pointer; }
:root:root body .ndx-dw .ndz-dfl.is-over:not(#_n#_n#_n) { box-shadow: inset 0 0 0 2px #0E7C86 !important; }
/* a file added since the form opened: "Not saved yet", as the record's held ones */
:root:root body .ndx-dw .ndz-nsv { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--sfff9e3); color: var(--i7a5b00); font-size: 11.5px; white-space: nowrap; }
/* the record's Comments / Documents drawer is the wider one (560px, --ph-drawer-w), so the forms' are too */
@media (min-width: 561px) {
  :root:root body .ndx-dw .ndx-dp:has(> .ndx-bd > :is(.ndz-phc, .ndz-files)):not(#_n#_n) { width: min(var(--ph-drawer-w, 560px), calc(100vw - 2 * var(--ph-panel-edge, 12px))) !important; }
}

/* 2026-12-01 | Monique ("please check the modal footers", Events side panel): the save status's margin-right:auto (time under the cloud, ph-formbar.css)
   and the right group's margin-left:auto (.ndx-dfa / .xp-fbt / splits) split the space, so Close floated in the middle. Close now carries the push and
   everything after it sits beside it: status left | Close + the panel's own button right, like the record pop-up's footer */
:root:root body .ndx-dw .ndx-df > .ndx-dfx:not(#_n#_n#_n#_n) { margin-left: auto !important; margin-right: 0 !important; }
:root:root body .ndx-dw .ndx-df > .ndx-dfx ~ *:not(#_n#_n#_n#_n) { margin-left: 0 !important; }

/* 2026-12-01 | Monique ("the empty shell should it also be centered, what is our logic now for standard" -> "Yes, add it"). THE RULE: a side panel's empty
   shell (PHFiles.emptyV2 - Comments, Documents, Folders & links, Events, Remind me, Related parties, Last interaction ...) sits in the middle of the panel,
   between its header and its footer. The matter page / record pop-up panels (#tpxQdo, #rvQdo) already did (line ~482); this does the same for every form's
   Record / Matter extras panel (.ndx-dw). Each box on the way down to the shell grows to fill the room; only the shell's own box centres it, so anything
   after it in the panel (a writing box) stays at the bottom. Hidden boxes are left alone. Replaces the Matter-Form-only rules in ph-matter-form.css. */
html :is(#ss, body) .ndx-dw .ndx-bd:has(.phf-e2):not(#_n#_n#_n) { display: flex; flex-direction: column; }
html :is(#ss, body) .ndx-dw .ndx-bd :is(div, section):not([hidden]):has(.phf-e2):not(#_n#_n#_n) { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin-top: 0; margin-bottom: 0; }
html :is(#ss, body) .ndx-dw .ndx-bd :is(div, section):not([hidden]):has(> .phf-e2):not(#_n#_n#_n) { justify-content: center; }
html :is(#ss, body) .ndx-dw .ndx-bd .phf-e2:not(#_n#_n#_n) { flex: none; margin-top: 0; margin-bottom: 0; }
html :is(#ss, body) .ndx-dw .ndx-bd:has(> .phf-e2):not(#_n#_n#_n) { justify-content: center; }
