/*
 * RCP global UI foundation — v1.0.18.534
 *
 * This file owns the visual language shared by RCP Staff screens. Module
 * stylesheets should define layout/workflow specifics only and consume these
 * semantic tokens/components rather than introducing their own colour system.
 *
 * A future administrator-selectable theme only needs to override the semantic
 * --rcpn-ui-* custom properties below (for example on body[data-rcpn-theme]).
 */
body.rcpn-app-shell{
  /* Surfaces */
  --rcpn-ui-bg:#f7f8fa;
  --rcpn-ui-surface:#ffffff;
  --rcpn-ui-surface-soft:#fbfcfd;
  --rcpn-ui-surface-hover:#f8fafb;

  /* Borders */
  --rcpn-ui-border:#e3e8ed;
  --rcpn-ui-border-strong:#d4dce4;

  /* Type */
  --rcpn-ui-text:#29384b;
  --rcpn-ui-text-soft:#425267;
  --rcpn-ui-muted:#748196;
  --rcpn-ui-muted-2:#94a0af;
  --rcpn-ui-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;

  /* Primary accent */
  --rcpn-ui-accent:#718ca8;
  --rcpn-ui-accent-ink:#3f5871;
  --rcpn-ui-accent-indicator:#c7d5e2;
  --rcpn-ui-link:#5f7892;
  --rcpn-ui-accent-hover:#7a94ad;
  --rcpn-ui-accent-text:#ffffff;
  --rcpn-ui-accent-soft:#eef3f7;
  --rcpn-ui-accent-border:#d7e2eb;

  /* Semantic states */
  --rcpn-ui-success:#557965;
  --rcpn-ui-success-bg:#f4faf6;
  --rcpn-ui-success-border:#d7e8df;
  --rcpn-ui-warning:#8b7550;
  --rcpn-ui-warning-bg:#fffaf1;
  --rcpn-ui-warning-border:#eadfca;
  --rcpn-ui-danger:#c86368;
  --rcpn-ui-danger-text:#9b6769;
  --rcpn-ui-danger-bg:#fff7f7;
  --rcpn-ui-danger-border:#efd2d4;

  /* Geometry / density */
  --rcpn-ui-radius:10px;
  --rcpn-ui-radius-sm:7px;
  --rcpn-ui-radius-pill:999px;
  --rcpn-ui-control-height:34px;
  --rcpn-ui-panel-padding:14px;
  --rcpn-ui-gap:12px;
  /* Canonical main-page breathing room. Shared by all RCP shell screens. */
  --rcpn-ui-page-padding:24px;
  --rcpn-ui-shadow-hover:0 4px 14px rgba(36,52,69,.045);

  /* Canonical table typography / density */
  --rcpn-ui-table-head-size:11px;
  --rcpn-ui-table-body-size:12.25px;
  --rcpn-ui-table-head-pad-y:9px;
  --rcpn-ui-table-cell-pad-y:10px;
  /* Shared table colour treatment: a faint cool tint gives structure without
   * turning RCP data tables into visually heavy striped lists. */
  --rcpn-ui-table-head-bg:#f3f6f9;
  --rcpn-ui-table-head-border:#dbe3ea;
  --rcpn-ui-table-row-border:#e9eef2;

  /* Canonical modal system */
  --rcpn-ui-modal-backdrop:rgba(15,23,42,.58);
  --rcpn-ui-modal-radius:12px;
  --rcpn-ui-modal-shadow:0 24px 72px rgba(15,23,42,.28);
  --rcpn-ui-modal-width:760px;
  --rcpn-ui-modal-width-compact:620px;
  --rcpn-ui-modal-width-wide:1080px;
  --rcpn-ui-modal-header-padding:16px 18px;
  --rcpn-ui-modal-content-padding:18px;
  --rcpn-ui-modal-footer-padding:12px 18px;
  --rcpn-ui-modal-action-height:32px;

  /* Shell geometry */
  --rcpn-shell-rail:58px;
  --rcpn-shell-nav:232px;
  --rcpn-shell-rail-bg:#2c3949;

  /* Compatibility aliases used by existing shell/module CSS during rollout. */
  --rcpn-shell-bg:var(--rcpn-ui-bg);
  --rcpn-shell-surface:var(--rcpn-ui-surface);
  --rcpn-shell-surface-soft:var(--rcpn-ui-surface-soft);
  --rcpn-shell-border:var(--rcpn-ui-border);
  --rcpn-shell-border-strong:var(--rcpn-ui-border-strong);
  --rcpn-shell-text:var(--rcpn-ui-text);
  --rcpn-shell-muted:var(--rcpn-ui-muted);
  --rcpn-shell-muted-2:var(--rcpn-ui-muted-2);
  --rcpn-shell-accent:var(--rcpn-ui-accent);
  --rcpn-shell-accent-soft:var(--rcpn-ui-accent-soft);
  --rcpn-shell-accent-border:var(--rcpn-ui-accent-border);
  --rcpn-shell-danger:var(--rcpn-ui-danger);
  --rcpn-shell-danger-bg:var(--rcpn-ui-danger-bg);
  --rcpn-shell-danger-border:var(--rcpn-ui-danger-border);
  --rcpn-shell-radius:var(--rcpn-ui-radius);
  --rcpn-shell-radius-sm:var(--rcpn-ui-radius-sm);

  background:var(--rcpn-ui-bg);
  color:var(--rcpn-ui-text);
  font-family:var(--rcpn-ui-font);
}

/* Global links */
body.rcpn-app-shell a{color:var(--rcpn-ui-link);}

/* Global buttons */
body.rcpn-app-shell .button,
body.rcpn-app-shell .button-secondary{
  box-sizing:border-box;
  min-height:var(--rcpn-ui-control-height);
  height:auto;
  padding:0 11px;
  border:1px solid var(--rcpn-ui-border-strong);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
  color:#5d7185;
  box-shadow:none;
  font-family:var(--rcpn-ui-font);
  font-size:12.5px;
  font-weight:450;
  line-height:calc(var(--rcpn-ui-control-height) - 2px);
  text-shadow:none;
}
body.rcpn-app-shell .button:hover,
body.rcpn-app-shell .button:focus{
  border-color:#c5d0da;
  background:var(--rcpn-ui-surface-hover);
  color:#455a70;
  box-shadow:none;
}
body.rcpn-app-shell .button-primary{
  background:var(--rcpn-ui-accent);
  border-color:var(--rcpn-ui-accent);
  color:var(--rcpn-ui-accent-text);
  box-shadow:none;
  text-shadow:none;
  font-weight:450;
}
body.rcpn-app-shell .button-primary:hover,
body.rcpn-app-shell .button-primary:focus,
body.rcpn-app-shell .button.rcpn-ui-button--primary:hover,
body.rcpn-app-shell .button.rcpn-ui-button--primary:focus{
  background:var(--rcpn-ui-accent-hover);
  border-color:var(--rcpn-ui-accent-hover);
  color:var(--rcpn-ui-accent-text);
}

/* Global form controls */
body.rcpn-app-shell input[type="text"],
body.rcpn-app-shell input[type="email"],
body.rcpn-app-shell input[type="password"],
body.rcpn-app-shell input[type="number"],
body.rcpn-app-shell input[type="date"],
body.rcpn-app-shell input[type="time"],
body.rcpn-app-shell select,
body.rcpn-app-shell textarea{
  box-sizing:border-box;
  max-width:100%;
  border:1px solid var(--rcpn-ui-border-strong);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
  box-shadow:none;
  color:var(--rcpn-ui-text-soft);
  font-family:var(--rcpn-ui-font);
  font-weight:400;
}
body.rcpn-app-shell input[type="text"],
body.rcpn-app-shell input[type="email"],
body.rcpn-app-shell input[type="password"],
body.rcpn-app-shell input[type="number"],
body.rcpn-app-shell input[type="date"],
body.rcpn-app-shell input[type="time"],
body.rcpn-app-shell select{
  min-height:var(--rcpn-ui-control-height);
  height:var(--rcpn-ui-control-height);
}
body.rcpn-app-shell input:focus,
body.rcpn-app-shell select:focus,
body.rcpn-app-shell textarea:focus{
  border-color:var(--rcpn-ui-accent);
  box-shadow:0 0 0 1px var(--rcpn-ui-accent);
  outline:none;
}

/* Universal panel/card primitives */
body.rcpn-app-shell .rcpn-ui-panel{
  box-sizing:border-box;
  margin:0;
  padding:var(--rcpn-ui-panel-padding);
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius);
  background:var(--rcpn-ui-surface);
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-panel-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 11px;
}
body.rcpn-app-shell .rcpn-ui-panel-heading h2,
body.rcpn-app-shell .rcpn-ui-panel-heading h3,
body.rcpn-app-shell .rcpn-ui-panel > h2,
body.rcpn-app-shell .rcpn-ui-panel > h3{
  margin:0;
  color:#354559;
  font-weight:500;
  line-height:1.3;
}
body.rcpn-app-shell .rcpn-ui-panel-heading h3,
body.rcpn-app-shell .rcpn-ui-panel > h3{font-size:14.5px;}
body.rcpn-app-shell .rcpn-ui-panel-heading p{
  margin:3px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:11px;
  font-weight:400;
  line-height:1.4;
}

/* Universal summary tile */
body.rcpn-app-shell .rcpn-ui-summary-card{
  box-sizing:border-box;
  min-height:64px;
  padding:10px 12px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:9px;
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-text);
  box-shadow:none;
  text-decoration:none;
  transition:border-color .12s ease,background .12s ease,transform .12s ease;
}
body.rcpn-app-shell .rcpn-ui-summary-card:hover,
body.rcpn-app-shell .rcpn-ui-summary-card:focus-visible{
  border-color:var(--rcpn-ui-border-strong);
  background:var(--rcpn-ui-surface-soft);
  outline:none;
}

/* Universal table treatment */
body.rcpn-app-shell .rcpn-ui-table,
body.rcpn-app-shell .rcpn-ui-panel > .widefat{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid var(--rcpn-ui-border);
  border-radius:8px;
  background:var(--rcpn-ui-surface);
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-table th,
body.rcpn-app-shell .rcpn-ui-panel > .widefat th{
  padding:var(--rcpn-ui-table-head-pad-y) 10px;
  border:0;
  border-bottom:1px solid var(--rcpn-ui-border);
  background:var(--rcpn-ui-table-head-bg);
  color:var(--rcpn-ui-text);
  font-size:var(--rcpn-ui-table-head-size);
  font-weight:500;
  line-height:1.3;
  letter-spacing:.015em;
  text-transform:none;
  vertical-align:middle;
}
body.rcpn-app-shell .rcpn-ui-table td,
body.rcpn-app-shell .rcpn-ui-panel > .widefat td{
  padding:var(--rcpn-ui-table-cell-pad-y) 10px;
  border:0;
  border-bottom:1px solid var(--rcpn-ui-table-row-border);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-text-soft);
  font-size:var(--rcpn-ui-table-body-size);
  line-height:1.4;
  vertical-align:middle;
}
body.rcpn-app-shell .rcpn-ui-table tbody tr:last-child td,
body.rcpn-app-shell .rcpn-ui-panel > .widefat tbody tr:last-child td{border-bottom:0;}

/* v1.0.18.753 — canonical shell table alignment.
 * Headings and body cells are left-aligned by default. The final genuine
 * column is right-aligned for totals/actions. Colspan rows keep their normal
 * left alignment so empty states and explanatory rows remain readable. */
body.rcpn-app-shell .rcpn-ui-table th,
body.rcpn-app-shell .rcpn-ui-table td,
body.rcpn-app-shell .rcpn-ui-panel > .widefat th,
body.rcpn-app-shell .rcpn-ui-panel > .widefat td,
body.rcpn-app-shell .rcpn-ui-archive-table th,
body.rcpn-app-shell .rcpn-ui-archive-table td{
  text-align:left;
}
body.rcpn-app-shell .rcpn-ui-table thead th:last-child,
body.rcpn-app-shell .rcpn-ui-panel > .widefat thead th:last-child,
body.rcpn-app-shell .rcpn-ui-archive-table thead th:last-child,
body.rcpn-app-shell .rcpn-ui-table tbody td:last-child:not([colspan]),
body.rcpn-app-shell .rcpn-ui-panel > .widefat tbody td:last-child:not([colspan]),
body.rcpn-app-shell .rcpn-ui-archive-table tbody td:last-child:not([colspan]){
  text-align:right;
}

/* Optional global table variants. */
body.rcpn-app-shell .rcpn-ui-table--hover tbody tr:not(.is-template):hover td{
  background:var(--rcpn-ui-surface-hover);
}
body.rcpn-app-shell .rcpn-ui-table--compact th{
  padding:7px 9px;
}
body.rcpn-app-shell .rcpn-ui-table--compact td{
  padding:8px 9px;
}
body.rcpn-app-shell .rcpn-ui-table--editable input[type="text"],
body.rcpn-app-shell .rcpn-ui-table--editable input[type="number"],
body.rcpn-app-shell .rcpn-ui-table--editable input[type="date"],
body.rcpn-app-shell .rcpn-ui-table--editable select,
body.rcpn-app-shell .rcpn-ui-table--editable textarea{
  box-sizing:border-box;
  width:100%;
  max-width:none;
  min-height:16px;
  margin:0;
  padding:6px 8px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-text);
  box-shadow:none;
  font:inherit;
}
body.rcpn-app-shell .rcpn-ui-table--editable textarea{
  min-height:32px;
  height:32px;
  resize:vertical;
}
body.rcpn-app-shell .rcpn-ui-table--editable .button-link-delete{
  min-height:28px;
  height:28px;
  margin:0;
  padding:0 8px;
  border:1px solid var(--rcpn-ui-danger-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-danger);
  line-height:26px;
  text-decoration:none;
}
body.rcpn-app-shell .rcpn-ui-table .rcpn-ui-table-empty td{
  color:var(--rcpn-ui-muted);
  font-style:normal;
}


/* v1.0.18.766 — shared operational-page stack and compact table context.
 * Pharmacy audit promoted these recurring patterns into the global shell so
 * modules own composition only, not typography or interaction styling. */
body.rcpn-app-shell .rcpn-ui-page-stack{
  display:grid;
  gap:12px;
  width:100%;
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-table-meta{
  display:block;
  margin-top:3px;
  color:var(--rcpn-ui-muted);
  font-size:10.75px;
  font-weight:450;
  line-height:1.35;
}
body.rcpn-app-shell .rcpn-ui-table-meta.is-warning{color:var(--rcpn-ui-warning);}
body.rcpn-app-shell .rcpn-ui-record-link{
  appearance:none;
  display:inline;
  width:auto;
  min-height:0;
  margin:0;
  padding:0;
  border:0;
  background:none;
  box-shadow:none;
  color:var(--rcpn-ui-text);
  font:inherit;
  text-align:left;
  text-decoration:none;
  cursor:pointer;
}
body.rcpn-app-shell .rcpn-ui-record-link:hover,
body.rcpn-app-shell .rcpn-ui-record-link:focus-visible{
  color:var(--rcpn-ui-accent-ink);
  text-decoration:underline;
  outline:0;
}
body.rcpn-app-shell .rcpn-ui-empty-state strong{
  display:block;
  color:var(--rcpn-ui-text);
  font-size:13px;
  font-weight:600;
  line-height:1.35;
}
body.rcpn-app-shell .rcpn-ui-empty-state strong + span{
  display:block;
  margin-top:3px;
  color:var(--rcpn-ui-muted);
  font-size:11px;
  line-height:1.4;
}

/* Reusable badges / counts */
body.rcpn-app-shell .rcpn-ui-count-badge,
body.rcpn-app-shell .rcpn-customer-action-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  padding:0 8px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-pill);
  background:#f6f8fa;
  color:#718095;
  font-size:11px;
  font-weight:500;
}
body.rcpn-app-shell .rcpn-contact-badge{
  display:inline-flex;
  align-items:center;
  padding:3px 7px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-pill);
  background:#f7f9fa;
  color:#687789;
  font-size:10.5px;
  font-weight:450;
}
body.rcpn-app-shell .rcpn-contact-badge.is-on{
  border-color:var(--rcpn-ui-success-border);
  background:var(--rcpn-ui-success-bg);
  color:var(--rcpn-ui-success);
}
body.rcpn-app-shell .rcpn-contact-badge.is-off{
  border-color:var(--rcpn-ui-danger-border);
  background:#fff8f8;
  color:var(--rcpn-ui-danger-text);
}
body.rcpn-app-shell .rcpn-contact-badge.is-warning{
  border-color:var(--rcpn-ui-warning-border);
  background:var(--rcpn-ui-warning-bg);
  color:var(--rcpn-ui-warning);
}

/* Empty-state primitive used by list/panel modules. */
body.rcpn-app-shell .rcpn-ui-empty-state,
body.rcpn-app-shell .rcpn-customer-actions-empty{
  padding:12px;
  border:1px dashed var(--rcpn-ui-border-strong);
  border-radius:8px;
  background:var(--rcpn-ui-surface-soft);
}

/* v1.0.18.520 — reusable interactive summary tiles and application modal. */
body.rcpn-app-shell{
  /* Themeable secondary accents used by summary/navigation components. */
  --rcpn-ui-tone-a:#6f8faa;
  --rcpn-ui-tone-a-soft:#f0f5f8;
  --rcpn-ui-tone-a-border:#d8e5ed;
  --rcpn-ui-tone-b:#638d86;
  --rcpn-ui-tone-b-soft:#eff7f5;
  --rcpn-ui-tone-b-border:#d5e8e3;
  --rcpn-ui-tone-c:#837aa0;
  --rcpn-ui-tone-c-soft:#f4f1f8;
  --rcpn-ui-tone-c-border:#e1dbea;
  --rcpn-ui-tone-d:#9b845e;
  --rcpn-ui-tone-d-soft:#faf6ee;
  --rcpn-ui-tone-d-border:#ebe1ce;
  --rcpn-ui-tone-e:#9a737a;
  --rcpn-ui-tone-e-soft:#faf2f3;
  --rcpn-ui-tone-e-border:#eadadd;
}
body.rcpn-app-shell button.rcpn-ui-summary-card{
  width:100%;
  margin:0;
  font:inherit;
  text-align:left;
  cursor:pointer;
}
body.rcpn-app-shell .rcpn-ui-summary-card--interactive{
  --rcpn-ui-summary-accent:var(--rcpn-ui-accent);
  --rcpn-ui-summary-soft:var(--rcpn-ui-accent-soft);
  --rcpn-ui-summary-border:var(--rcpn-ui-accent-border);
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 18px;
  align-items:center;
  gap:10px;
}
body.rcpn-app-shell .rcpn-ui-summary-card--tone-a{--rcpn-ui-summary-accent:var(--rcpn-ui-tone-a);--rcpn-ui-summary-soft:var(--rcpn-ui-tone-a-soft);--rcpn-ui-summary-border:var(--rcpn-ui-tone-a-border);}
body.rcpn-app-shell .rcpn-ui-summary-card--tone-b{--rcpn-ui-summary-accent:var(--rcpn-ui-tone-b);--rcpn-ui-summary-soft:var(--rcpn-ui-tone-b-soft);--rcpn-ui-summary-border:var(--rcpn-ui-tone-b-border);}
body.rcpn-app-shell .rcpn-ui-summary-card--tone-c{--rcpn-ui-summary-accent:var(--rcpn-ui-tone-c);--rcpn-ui-summary-soft:var(--rcpn-ui-tone-c-soft);--rcpn-ui-summary-border:var(--rcpn-ui-tone-c-border);}
body.rcpn-app-shell .rcpn-ui-summary-card--tone-d{--rcpn-ui-summary-accent:var(--rcpn-ui-tone-d);--rcpn-ui-summary-soft:var(--rcpn-ui-tone-d-soft);--rcpn-ui-summary-border:var(--rcpn-ui-tone-d-border);}
body.rcpn-app-shell .rcpn-ui-summary-card--tone-e{--rcpn-ui-summary-accent:var(--rcpn-ui-tone-e);--rcpn-ui-summary-soft:var(--rcpn-ui-tone-e-soft);--rcpn-ui-summary-border:var(--rcpn-ui-tone-e-border);}
body.rcpn-app-shell .rcpn-ui-summary-icon{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border:1px solid var(--rcpn-ui-summary-border);
  border-radius:9px;
  background:var(--rcpn-ui-summary-soft);
  color:var(--rcpn-ui-summary-accent);
}
body.rcpn-app-shell .rcpn-ui-summary-icon .dashicons{
  width:18px;
  height:18px;
  font-size:18px;
  line-height:18px;
}
/* Canonical icon action card: shared by Invoice related workflows, Claims
 * detail actions, Payment Plan actions and future shell action-card rows. */
body.rcpn-app-shell .rcpn-ui-summary-card--action .rcpn-ui-summary-value{
  overflow:visible;
  font-size:12px;
  font-weight:500;
  line-height:1.25;
  text-overflow:clip;
  white-space:normal;
}
body.rcpn-app-shell .rcpn-ui-summary-chevron{
  width:16px;
  height:16px;
  color:var(--rcpn-ui-muted-2);
  font-size:16px;
  line-height:16px;
  transition:transform .14s ease,color .14s ease;
}
body.rcpn-app-shell .rcpn-ui-summary-card--interactive:hover,
body.rcpn-app-shell .rcpn-ui-summary-card--interactive:focus-visible{
  border-color:var(--rcpn-ui-summary-border);
  background:var(--rcpn-ui-summary-soft);
  box-shadow:var(--rcpn-ui-shadow-hover);
  transform:translateY(-1px);
}
body.rcpn-app-shell .rcpn-ui-summary-card--interactive:hover .rcpn-ui-summary-chevron,
body.rcpn-app-shell .rcpn-ui-summary-card--interactive:focus-visible .rcpn-ui-summary-chevron{
  color:var(--rcpn-ui-summary-accent);
  transform:translateX(2px);
}


/* Canonical shell diary geometry. Legacy diary CSS must not determine row size
 * inside the modern app shell. Compact variants may override the token locally. */
body.rcpn-app-shell .rcpn-diary-grid tbody th,
body.rcpn-app-shell .rcpn-diary-grid tbody td{
  box-sizing:border-box;
  height:var(--rcpn-ui-diary-slot-height);
  min-height:var(--rcpn-ui-diary-slot-height);
  padding-top:0;
  padding-bottom:0;
  vertical-align:middle;
}
body.rcpn-app-shell .rcpn-diary-grid tbody td.rcpn-diary-slot{padding:0;}
body.rcpn-app-shell .rcpn-diary-grid .rcpn-diary-empty-slot{
  box-sizing:border-box;
  min-height:calc(var(--rcpn-ui-diary-slot-height) - 1px);
}

body.rcpn-ui-modal-open,
body.rcpn-print-modal-open{overflow:hidden;}

/*
 * Canonical RCP modal component.
 * All shell-native modals should use this structure/classes. Legacy module
 * classes may be retained alongside them for behaviour hooks only.
 */
body.rcpn-app-shell .rcpn-ui-modal{
  position:fixed;
  inset:0;
  z-index:100500;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  box-sizing:border-box;
}
body.rcpn-app-shell .rcpn-ui-modal.is-open{display:flex;}
body.rcpn-app-shell .rcpn-ui-modal-backdrop{
  position:absolute;
  inset:0;
  background:var(--rcpn-ui-modal-backdrop);
  backdrop-filter:blur(1px);
}
body.rcpn-app-shell .rcpn-ui-modal-dialog{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  width:min(var(--rcpn-ui-modal-width),calc(100vw - 48px));
  max-height:calc(100vh - 48px);
  overflow:hidden;
  padding:0;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-modal-radius);
  background:var(--rcpn-ui-surface);
  box-shadow:var(--rcpn-ui-modal-shadow);
}
body.rcpn-app-shell .rcpn-ui-modal-dialog--compact{
  width:min(var(--rcpn-ui-modal-width-compact),calc(100vw - 48px));
}
body.rcpn-app-shell .rcpn-ui-modal-dialog--wide{
  width:min(var(--rcpn-ui-modal-width-wide),calc(100vw - 48px));
}
body.rcpn-app-shell .rcpn-ui-modal-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  flex:0 0 auto;
  padding:var(--rcpn-ui-modal-header-padding);
  border-bottom:1px solid var(--rcpn-ui-border);
  background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-ui-modal-header h2{
  margin:0;
  color:var(--rcpn-ui-text);
  font-size:19px;
  font-weight:500;
  line-height:1.25;
}
body.rcpn-app-shell .rcpn-ui-modal-header p{
  margin:3px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:11.5px;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-ui-modal-header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex:0 0 auto;
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-modal-header-actions .rcpn-print-label-control{
  display:inline-flex;
  align-items:center;
  margin:0;
}
body.rcpn-app-shell .rcpn-ui-modal-header-actions .button{
  margin:0;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-modal-close{
  position:static;
  display:grid;
  place-items:center;
  flex:0 0 32px;
  width:32px;
  height:32px;
  padding:0;
  border:1px solid var(--rcpn-ui-border);
  border-radius:8px;
  background:var(--rcpn-ui-surface-soft);
  color:var(--rcpn-ui-muted);
  font-size:0;
  line-height:1;
  cursor:pointer;
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-modal-close:hover,
body.rcpn-app-shell .rcpn-ui-modal-close:focus-visible{
  border-color:var(--rcpn-ui-border-strong);
  background:var(--rcpn-ui-surface-hover);
  color:var(--rcpn-ui-text-soft);
  outline:none;
}
body.rcpn-app-shell .rcpn-ui-modal-close span{
  width:auto;
  height:auto;
  font-size:22px;
  line-height:1;
  transform:translateY(-1px);
}
body.rcpn-app-shell .rcpn-ui-modal-content{
  min-height:0;
  padding:var(--rcpn-ui-modal-content-padding);
  overflow:auto;
  background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-ui-modal-footer{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex:0 0 auto;
  padding:var(--rcpn-ui-modal-footer-padding);
  border-top:1px solid var(--rcpn-ui-border);
  background:var(--rcpn-ui-surface-soft);
}
body.rcpn-app-shell .rcpn-ui-modal .rcpn-ui-table{width:100%;}

/* Label-print modals now consume the same component while retaining legacy JS hooks. */
body.rcpn-app-shell .rcpn-print-label-modal.rcpn-ui-modal{
  align-items:center;
  justify-content:center;
  padding:24px;
}
body.rcpn-app-shell .rcpn-print-label-modal .rcpn-print-label-modal__overlay.rcpn-ui-modal-backdrop{
  background:var(--rcpn-ui-modal-backdrop);
}
body.rcpn-app-shell .rcpn-print-label-modal .rcpn-print-label-modal__panel.rcpn-ui-modal-dialog{
  overflow:hidden;
}
body.rcpn-app-shell .rcpn-print-label-modal .rcpn-print-label-summary{
  margin:0 0 16px;
  padding:12px 14px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface-soft);
}
body.rcpn-app-shell .rcpn-print-label-modal .rcpn-print-label-form{
  display:flex;
  flex-direction:column;
  gap:12px;
}
body.rcpn-app-shell .rcpn-print-label-modal .rcpn-ui-modal-footer .button-primary{
  min-width:82px;
}

@media (max-width:720px){
  body.rcpn-app-shell .rcpn-ui-modal,
  body.rcpn-app-shell .rcpn-print-label-modal.rcpn-ui-modal{padding:12px;}
  body.rcpn-app-shell .rcpn-ui-modal-dialog,
  body.rcpn-app-shell .rcpn-ui-modal-dialog--compact,
  body.rcpn-app-shell .rcpn-ui-modal-dialog--wide{
    width:calc(100vw - 24px);
    max-height:calc(100vh - 24px);
  }
}

/* v1.0.18.520 — reusable section divider for major application-content transitions. */
body.rcpn-app-shell .rcpn-ui-section-divider{
  margin:22px 0 12px;
  padding-top:12px;
  border-top:1px solid var(--rcpn-ui-border-strong);
}
body.rcpn-app-shell .rcpn-ui-section-divider span{
  display:block;
  color:var(--rcpn-ui-text-soft);
  font-size:11px;
  font-weight:550;
  letter-spacing:.055em;
  line-height:1.25;
  text-transform:uppercase;
}
body.rcpn-app-shell .rcpn-ui-section-divider p{
  margin:3px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:11px;
  font-weight:400;
  line-height:1.4;
}

/* v1.0.18.521 — stronger global major-section divider. */
body.rcpn-app-shell .rcpn-ui-section-divider{
  margin:30px 0 18px;
  padding-top:17px;
}
body.rcpn-app-shell .rcpn-ui-section-divider span{
  font-size:14px;
  font-weight:500;
}

/* v1.0.18.522 — balanced major section transitions and compact panel footer primitives. */
body.rcpn-app-shell .rcpn-ui-section-divider{
  margin:32px 0 32px;
  padding-top:18px;
}
body.rcpn-app-shell .rcpn-ui-panel-footer,
body.rcpn-app-shell .rcpn-cp-card-footer{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  margin-top:auto;
  padding-top:12px;
}
body.rcpn-app-shell details.rcpn-ui-details,
body.rcpn-app-shell details.rcpn-identity-help{
  margin-top:10px;
  padding-top:9px;
  border-top:1px solid var(--rcpn-ui-border);
  color:var(--rcpn-ui-muted);
  font-size:11px;
  line-height:1.45;
}
body.rcpn-app-shell details.rcpn-ui-details summary,
body.rcpn-app-shell details.rcpn-identity-help summary{
  color:var(--rcpn-ui-text-soft);
  font-weight:500;
  cursor:pointer;
}
body.rcpn-app-shell details.rcpn-ui-details p,
body.rcpn-app-shell details.rcpn-identity-help p{
  margin:7px 0 0;
}

/* v1.0.18.523 — reusable inverse sticky header and compact setting surface. */
body.rcpn-app-shell{
  --rcpn-ui-inverse-bg:#45586c;
  --rcpn-ui-inverse-text:#f8fafc;
  --rcpn-ui-inverse-muted:#c9d3dd;
  --rcpn-ui-inverse-border:rgba(255,255,255,.18);
  --rcpn-ui-inverse-hover:rgba(255,255,255,.08);
  --rcpn-ui-inverse-primary:#ffffff;
  --rcpn-ui-inverse-primary-text:#3d5064;
}
body.rcpn-app-shell .rcpn-ui-sticky-header{
  position:sticky;
  top:10px;
  z-index:90;
}
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse{
  border-color:var(--rcpn-ui-inverse-bg);
  background:var(--rcpn-ui-inverse-bg);
  color:var(--rcpn-ui-inverse-text);
  box-shadow:0 8px 22px rgba(36,51,67,.12);
}
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse h1,
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse h2,
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse h3,
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse strong{
  color:var(--rcpn-ui-inverse-text);
}
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse p,
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse .description,
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse .rcpn-cp-muted,
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse .rcpn-cp-eyebrow{
  color:var(--rcpn-ui-inverse-muted);
}
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse .button,
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse .button-secondary{
  border-color:var(--rcpn-ui-inverse-border);
  background:transparent;
  color:var(--rcpn-ui-inverse-text);
}
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse .button:hover,
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse .button:focus{
  border-color:rgba(255,255,255,.34);
  background:var(--rcpn-ui-inverse-hover);
  color:#fff;
}
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse .button-primary{
  border-color:var(--rcpn-ui-inverse-primary);
  background:var(--rcpn-ui-inverse-primary);
  color:var(--rcpn-ui-inverse-primary-text);
}
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse .button-primary:hover,
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse .button-primary:focus{
  border-color:#eef3f7;
  background:#eef3f7;
  color:#34475a;
}
body.rcpn-app-shell .rcpn-ui-setting-surface{
  padding:11px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface-soft);
}

/* v1.0.18.525 — reusable compact checkbox/radio choice tile. */
.rcpn-app-shell .rcpn-ui-choice-option{
  display:grid;
  grid-template-columns:15px minmax(0,1fr);
  align-items:center;
  gap:6px;
  min-height:34px;
  box-sizing:border-box;
  margin:0;
  padding:6px 7px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:7px;
  background:var(--rcpn-ui-surface-soft);
  color:var(--rcpn-ui-text-soft);
  cursor:pointer;
}
.rcpn-app-shell .rcpn-ui-choice-option input[type="checkbox"],
.rcpn-app-shell .rcpn-ui-choice-option input[type="radio"]{
  width:14px;
  height:14px;
  min-width:14px;
  margin:0;
}
.rcpn-app-shell .rcpn-ui-choice-option strong{
  display:block;
  margin:0;
  color:var(--rcpn-ui-text-soft);
  font-size:11px;
  font-weight:500;
  line-height:1.25;
}
.rcpn-app-shell .rcpn-ui-choice-option > span{
  color:var(--rcpn-ui-text-soft);
  font-size:12px;
  font-weight:400;
  line-height:1.35;
}
.rcpn-app-shell .rcpn-ui-choice-option:hover{
  border-color:var(--rcpn-ui-border-strong);
  background:var(--rcpn-ui-surface-hover);
}

/* v1.0.18.527 — reusable status/clinical flag chip. */
body.rcpn-app-shell .rcpn-ui-status-chip{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  box-sizing:border-box;
  padding:2px 8px;
  border:1px solid var(--rcpn-ui-border-strong);
  border-radius:var(--rcpn-ui-radius-pill);
  background:var(--rcpn-ui-surface-soft);
  color:var(--rcpn-ui-text-soft);
  font-size:10px;
  font-weight:500;
  line-height:1.25;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-status-chip.is-success{border-color:var(--rcpn-ui-success-border);background:var(--rcpn-ui-success-bg);color:var(--rcpn-ui-success);}
body.rcpn-app-shell .rcpn-ui-status-chip.is-warning{border-color:var(--rcpn-ui-warning-border);background:var(--rcpn-ui-warning-bg);color:var(--rcpn-ui-warning);}
body.rcpn-app-shell .rcpn-ui-status-chip.is-danger{border-color:var(--rcpn-ui-danger-border);background:var(--rcpn-ui-danger-bg);color:var(--rcpn-ui-danger-text);}
body.rcpn-app-shell .rcpn-ui-status-chip.is-neutral{border-color:var(--rcpn-ui-border);background:var(--rcpn-ui-surface-soft);color:var(--rcpn-ui-muted);}
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse .rcpn-ui-status-chip{
  border-color:rgba(255,255,255,.2);
  background:rgba(255,255,255,.08);
  color:var(--rcpn-ui-inverse-text);
}
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse .rcpn-ui-status-chip.is-success{border-color:rgba(195,232,209,.38);background:rgba(119,177,141,.18);color:#e7f6ec;}
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse .rcpn-ui-status-chip.is-warning{border-color:rgba(235,216,173,.38);background:rgba(191,157,83,.18);color:#fff3cf;}
body.rcpn-app-shell .rcpn-ui-sticky-header--inverse .rcpn-ui-status-chip.is-danger{border-color:rgba(243,184,187,.38);background:rgba(197,102,108,.2);color:#ffe9ea;}

/* v1.0.18.530: universal read-only detail rows used by profile summary cards. */
body.rcpn-app-shell .rcpn-ui-detail-list{
  display:grid;
  gap:0;
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-detail-row{
  min-width:0;
  padding:9px 0;
  border-bottom:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-detail-row:last-child{border-bottom:0;}
body.rcpn-app-shell .rcpn-ui-detail-row > span{
  display:block;
  margin:0 0 2px;
  color:var(--rcpn-ui-muted-2);
  font-size:10px;
  font-weight:450;
  line-height:1.3;
}
body.rcpn-app-shell .rcpn-ui-detail-row > strong{
  display:block;
  min-width:0;
  overflow-wrap:anywhere;
  color:var(--rcpn-ui-text-soft);
  font-size:11.5px;
  font-weight:500;
  line-height:1.35;
}

/* v1.0.18.536: canonical stacked content treatment for legacy plan sections inside RCP panels. */
body.rcpn-app-shell .rcpn-ui-panel--stacked{
  display:block;
  grid-template-columns:none;
  gap:0;
}
body.rcpn-app-shell .rcpn-ui-panel--stacked > .rcpn-plan-section-label{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:0;
  margin:0 0 10px;
  color:var(--rcpn-ui-text);
}
body.rcpn-app-shell .rcpn-ui-panel--stacked > .rcpn-plan-section-label strong{
  color:var(--rcpn-ui-text);
  font-size:14px;
  font-weight:500;
  line-height:1.3;
}
body.rcpn-app-shell .rcpn-ui-panel--stacked > .rcpn-plan-section-content{
  width:100%;
  min-width:0;
  padding:0;
}

/* v1.0.18.540: RCP tables are static by default. Row hover is reserved for explicitly interactive list variants. */
body.rcpn-app-shell .rcpn-ui-table--hover tbody tr:not(.is-template):hover td{
  background:var(--rcpn-ui-surface);
}

/* v1.0.18.545: canonical modal tables align headers and body content consistently. */
body.rcpn-app-shell .rcpn-ui-modal .rcpn-ui-table th,
body.rcpn-app-shell .rcpn-ui-modal .rcpn-ui-table td{
  text-align:left;
}

/* v1.0.18.559 / .640 — canonical RCP page canvas + full-bleed page-header geometry.
 * The padding is applied centrally here rather than by each module stylesheet.
 * Every migrated operational shell must opt into this geometry here; CT Episode
 * and Estimate are deliberately included alongside Surgery/Hospital rather than
 * patched locally. New shell pages must be registered here when introduced.
 */
body.rcpn-app-shell .wrap.rcpn-staff-dashboard-wrap,
body.rcpn-app-shell.rcpn-shell-customer-profile #rcpn-customer-profile,
body.rcpn-app-shell.rcpn-shell-add-client #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-patient-profile #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-invoice #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-claim #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-payment-plan #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-financials #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-debt-management #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-case-overview #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-cases-list #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-hospital-list #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-surgery-add #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-hospital-case #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-surgery-case #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-surgery-diary #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-ct-diary #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-ct-request #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-ct-case #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-lab-task #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-lab-tasks #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-lab-procedure #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-clinic #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-service #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-medicine #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-estimate #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-prescription #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-consent-form #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-appointment #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-appointment-diary #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-appointment-today #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-appointment-request #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-equizone-run-sheet #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-dispensing #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-local-stock #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-transfers #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-stock-receipts #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-reconcile #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-expiry #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-audit #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-queries #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-options #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-staff-permissions #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-staff-accounts #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-staff-mail #wpbody-content > .wrap{
  box-sizing:border-box;
  width:100%;
  max-width:none;
  margin:0;
  padding:var(--rcpn-ui-page-padding);
}

/* Profile screens start with a full-bleed inverse header, so only their top
 * canvas padding is removed. Left/right/bottom remain the canonical 24px.
 */
body.rcpn-app-shell.rcpn-shell-customer-profile #rcpn-customer-profile,
body.rcpn-app-shell.rcpn-shell-add-client #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-patient-profile #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-invoice #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-claim #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-payment-plan #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-financials #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-debt-management #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-case-overview #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-cases-list #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-hospital-list #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-surgery-add #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-hospital-case #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-surgery-case #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-surgery-diary #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-ct-diary #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-ct-request #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-ct-case #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-lab-task #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-lab-tasks #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-lab-procedure #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-clinic #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-service #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-medicine #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-estimate #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-prescription #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-consent-form #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-appointment #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-appointment-today #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-appointment-request #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-equizone-run-sheet #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-dispensing #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-local-stock #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-transfers #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-stock-receipts #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-reconcile #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-expiry #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-audit #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-queries #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-pharmacy-options #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-staff-permissions #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-staff-accounts #wpbody-content > .wrap,
body.rcpn-app-shell.rcpn-shell-staff-mail #wpbody-content > .wrap{
  padding-top:0;
}

/* One canonical full-width inverse page header. box-sizing:border-box is
 * essential here: without it the header's own 24px padding adds to its width
 * and can cause the Patient header/actions to overflow the viewport.
 */
body.rcpn-app-shell .rcpn-ui-sticky-header.rcpn-ui-sticky-header--inverse{
  box-sizing:border-box;
  width:calc(100% + (2 * var(--rcpn-ui-page-padding)));
  max-width:none;
  margin:0 calc(-1 * var(--rcpn-ui-page-padding)) var(--rcpn-ui-page-padding);
  padding-left:var(--rcpn-ui-page-padding);
  padding-right:var(--rcpn-ui-page-padding);
  border-left:0;
  border-right:0;
  border-radius:0;
  top:0;
}

@media(max-width:782px){
  body.rcpn-app-shell{
    --rcpn-ui-page-padding:14px;
  }
}

/* v1.0.18.560 — canonical profile chrome.
 * Client and Patient profiles now share the same header/action/summary geometry.
 * Module stylesheets may control their content layout, but not these dimensions.
 */
body.rcpn-app-shell .rcpn-ui-profile-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  min-height:86px;
  padding-top:14px;
  padding-bottom:14px;
}
body.rcpn-app-shell .rcpn-ui-profile-header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:6px;
}
body.rcpn-app-shell .rcpn-ui-profile-header-actions .button,
body.rcpn-app-shell .rcpn-ui-profile-header-actions .button-small,
body.rcpn-app-shell .rcpn-ui-profile-header-actions .rcpn-print-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  min-height:32px;
  height:32px;
  margin:0;
  padding:0 10px;
  border-radius:7px;
  font-size:11.5px;
  font-weight:450;
  line-height:30px;
  vertical-align:middle;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-profile-header-actions .button .dashicons,
body.rcpn-app-shell .rcpn-ui-profile-header-actions .rcpn-print-button .dashicons{
  display:inline-block;
  flex:0 0 14px;
  width:14px;
  height:14px;
  margin:0 5px 0 0;
  padding:0;
  font-size:14px;
  line-height:14px;
  vertical-align:middle;
}
body.rcpn-app-shell .rcpn-ui-summary-grid{
  display:grid;
  gap:8px;
  margin:0 0 12px;
}
body.rcpn-app-shell .rcpn-ui-summary-grid > .rcpn-ui-summary-card{
  min-height:68px;
  padding:10px 12px;
}
body.rcpn-app-shell .rcpn-ui-summary-copy{
  display:block;
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-summary-label{
  display:block;
  margin:0 0 3px;
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  font-weight:450;
  line-height:1.2;
}
body.rcpn-app-shell .rcpn-ui-summary-value{
  display:block;
  margin:0;
  color:var(--rcpn-ui-text);
  font-size:16px;
  font-weight:500;
  line-height:1.15;
}

/* Shared profile identity typography and responsive summary geometry. */
body.rcpn-app-shell .rcpn-ui-profile-title{
  margin:0;
  padding:0;
  color:var(--rcpn-ui-inverse-text);
  font-size:23px;
  font-weight:450;
  line-height:1.2;
  letter-spacing:-.015em;
}
body.rcpn-app-shell .rcpn-ui-profile-eyebrow{
  display:block;
  margin:0 0 4px;
  color:var(--rcpn-ui-inverse-muted);
  font-size:10.5px;
  font-weight:500;
  line-height:1.2;
  letter-spacing:.055em;
}
body.rcpn-app-shell .rcpn-ui-summary-grid{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
@media(max-width:1280px){
  body.rcpn-app-shell .rcpn-ui-summary-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:980px){
  body.rcpn-app-shell .rcpn-ui-profile-header{
    flex-direction:column;
    align-items:flex-start;
  }
  body.rcpn-app-shell .rcpn-ui-profile-header-actions{
    justify-content:flex-start;
  }
}
@media(max-width:720px){
  body.rcpn-app-shell .rcpn-ui-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:520px){
  body.rcpn-app-shell .rcpn-ui-summary-grid{
    grid-template-columns:1fr;
  }
}

/* v1.0.18.561 — central RCP layout/component system.
 * Local module styles should consume these primitives rather than recreate
 * grids, cards, section headings, actions, form layouts or button variants.
 */
body.rcpn-app-shell{
  --rcpn-ui-space-1:4px;
  --rcpn-ui-space-2:8px;
  --rcpn-ui-space-3:12px;
  --rcpn-ui-space-4:16px;
  --rcpn-ui-space-5:24px;
  --rcpn-ui-section-space:32px;
  --rcpn-ui-section-content-gap:12px;
  --rcpn-ui-card-min-height:0px;
  --rcpn-ui-diary-slot-height:47px;
}

/* Generic grid / stack primitives. */
body.rcpn-app-shell .rcpn-ui-grid{
  display:grid;
  gap:var(--rcpn-ui-gap);
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-grid > *{min-width:0;}
body.rcpn-app-shell .rcpn-ui-grid--1{grid-template-columns:minmax(0,1fr);}
body.rcpn-app-shell .rcpn-ui-grid--2{grid-template-columns:repeat(2,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-grid--3{grid-template-columns:repeat(3,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-grid--4{grid-template-columns:repeat(4,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-grid--5{grid-template-columns:repeat(5,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-grid--2-1{grid-template-columns:minmax(0,2fr) minmax(280px,1fr);}
body.rcpn-app-shell .rcpn-ui-grid--1-2{grid-template-columns:minmax(280px,1fr) minmax(0,2fr);}
body.rcpn-app-shell .rcpn-ui-grid--start{align-items:start;}
body.rcpn-app-shell .rcpn-ui-grid--stretch{align-items:stretch;}
/* Canonical equal-height content-card rows. Use whenever panels share a grid row. */
body.rcpn-app-shell .rcpn-ui-grid--equal-panels{align-items:stretch;}
body.rcpn-app-shell .rcpn-ui-grid--equal-panels > .rcpn-ui-panel{height:100%;box-sizing:border-box;}
body.rcpn-app-shell .rcpn-ui-grid__full{grid-column:1/-1;}
body.rcpn-app-shell .rcpn-ui-stack{
  display:flex;
  flex-direction:column;
  gap:var(--rcpn-ui-gap);
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-stack--tight{gap:var(--rcpn-ui-space-2);}
body.rcpn-app-shell .rcpn-ui-stack--loose{gap:var(--rcpn-ui-space-4);}

/* Canonical page section and section-heading geometry. */
body.rcpn-app-shell .rcpn-ui-section{min-width:0;}
body.rcpn-app-shell .rcpn-ui-section-content{
  display:flex;
  flex-direction:column;
  gap:var(--rcpn-ui-section-content-gap);
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-section-heading,
body.rcpn-app-shell .rcpn-ui-section-divider{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:var(--rcpn-ui-space-4);
  margin:var(--rcpn-ui-section-space) 0 var(--rcpn-ui-space-4);
  padding-top:var(--rcpn-ui-space-5);
  border-top:1px solid var(--rcpn-ui-border-strong);
}
body.rcpn-app-shell .rcpn-ui-section-heading-copy,
body.rcpn-app-shell .rcpn-ui-section-heading > div:first-child,
body.rcpn-app-shell .rcpn-ui-section-divider > div:first-child{min-width:0;}
body.rcpn-app-shell .rcpn-ui-section-heading h2,
body.rcpn-app-shell .rcpn-ui-section-heading > .rcpn-ui-section-heading-copy > span,
body.rcpn-app-shell .rcpn-ui-section-divider > .rcpn-ui-section-heading-copy > span,
body.rcpn-app-shell .rcpn-ui-section-divider > div:first-child > span{
  display:block;
  margin:0;
  color:var(--rcpn-ui-text);
  font-size:20px;
  font-weight:500;
  line-height:1.25;
  letter-spacing:-.012em;
  text-transform:none;
}
body.rcpn-app-shell .rcpn-ui-section-heading p,
body.rcpn-app-shell .rcpn-ui-section-divider > .rcpn-ui-section-heading-copy > p,
body.rcpn-app-shell .rcpn-ui-section-divider > div:first-child > p{
  margin:4px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:11.5px;
  font-weight:400;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-ui-section-heading__actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:var(--rcpn-ui-space-2);
}

/* Card aliases and variants. `.rcpn-ui-panel` remains supported for existing markup. */
body.rcpn-app-shell .rcpn-ui-card,
body.rcpn-app-shell .rcpn-ui-panel{
  box-sizing:border-box;
  min-width:0;
  margin:0;
  padding:var(--rcpn-ui-panel-padding);
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius);
  background:var(--rcpn-ui-surface);
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-card--fill,
body.rcpn-app-shell .rcpn-ui-panel--fill{height:100%;}
body.rcpn-app-shell .rcpn-ui-card--compact,
body.rcpn-app-shell .rcpn-ui-panel--compact{padding:12px;}
body.rcpn-app-shell .rcpn-ui-card--flat,
body.rcpn-app-shell .rcpn-ui-panel--flat{
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
body.rcpn-app-shell .rcpn-ui-card-heading,
body.rcpn-app-shell .rcpn-ui-panel-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:var(--rcpn-ui-space-3);
  margin:0 0 11px;
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-card-heading > div:first-child,
body.rcpn-app-shell .rcpn-ui-panel-heading > div:first-child{min-width:0;}
body.rcpn-app-shell .rcpn-ui-card-heading h2,
body.rcpn-app-shell .rcpn-ui-card-heading h3,
body.rcpn-app-shell .rcpn-ui-panel-heading h2,
body.rcpn-app-shell .rcpn-ui-panel-heading h3{
  margin:0;
  padding:0;
  color:var(--rcpn-ui-text);
  font-size:14.5px;
  font-weight:500;
  line-height:1.3;
}
/* WordPress applies padding to headings beneath #poststuff. RCP shell headings
 * keep the canonical panel alignment even when a shell surface still uses the
 * underlying post edit form container. */
body.rcpn-app-shell #poststuff .rcpn-ui-card-heading h2,
body.rcpn-app-shell #poststuff .rcpn-ui-card-heading h3,
body.rcpn-app-shell #poststuff .rcpn-ui-panel-heading h2,
body.rcpn-app-shell #poststuff .rcpn-ui-panel-heading h3{
  margin:0;
  padding:0;
}
body.rcpn-app-shell .rcpn-ui-card-heading p,
body.rcpn-app-shell .rcpn-ui-panel-heading p{
  margin:3px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:11px;
  font-weight:400;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-ui-card-footer,
body.rcpn-app-shell .rcpn-ui-panel-footer{
  display:flex;
  align-items:center;
  gap:var(--rcpn-ui-space-2);
  margin-top:auto;
  padding-top:var(--rcpn-ui-space-3);
}

/* Shared sectioned panel: follows the canonical Master Case panel rhythm.
 * The panel keeps normal inset padding, the heading divider stays inset, and
 * flush bodies may extend back to the panel edges for workflow-specific rows. */
body.rcpn-app-shell .rcpn-ui-panel--sectioned{
  padding:var(--rcpn-ui-panel-padding);
  overflow:hidden;
}
body.rcpn-app-shell .rcpn-ui-panel--sectioned > .rcpn-ui-panel-heading{
  margin:0;
  padding:0 0 12px;
  border-bottom:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-panel-section-body{
  min-width:0;
  padding-top:12px;
}
/* Invoice-canonical line items. All catalogue-backed workflows share these
 * table and toolbar primitives; columns and business rules stay contextual. */
body.rcpn-app-shell .rcpn-ui-line-items-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 14px;
}
body.rcpn-app-shell .rcpn-ui-line-items-table{
  width:100%;
  border:1px solid #e2e4e7;
  border-radius:10px;
  border-spacing:0;
  overflow:hidden;
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-line-items-table thead th{
  background:#f6f7f7;
  padding:12px 10px;
  font-weight:600;
}
body.rcpn-app-shell .rcpn-ui-line-items-table tbody td{
  padding:10px;
  background:#fff;
  vertical-align:middle;
  border-bottom:1px solid #e2e4e7;
}
body.rcpn-app-shell .rcpn-ui-line-items-table tbody tr:nth-child(even) td{background:#fff;}
body.rcpn-app-shell .rcpn-ui-line-items-table tbody tr:last-child td{border-bottom:0;}
body.rcpn-app-shell .rcpn-ui-line-items-table .rcpn-line-static{
  display:block;
  min-width:0;
  padding:4px 0;
  color:#1d2327;
  font-size:13px;
  font-weight:400;
  line-height:1.45;
  word-break:break-word;
}
body.rcpn-app-shell .rcpn-ui-line-items-table .rcpn-line-type-label{font-weight:600;}
body.rcpn-app-shell .rcpn-ui-line-items-table .rcpn-qty{width:88px;max-width:100%;}
body.rcpn-app-shell .rcpn-ui-line-items-table .rcpn-unit-display,
body.rcpn-app-shell .rcpn-ui-line-items-table .rcpn-line-total{white-space:nowrap;font-variant-numeric:tabular-nums;}
/* Generic subdivision inside a sectioned panel. */
body.rcpn-app-shell .rcpn-ui-panel-subsection{min-width:0;}
/* Nested titled sections use the same canonical card-title typography and
 * inset divider as top-level shell panels. This keeps title geometry global
 * even when two logical sections share one outer card. */
body.rcpn-app-shell .rcpn-ui-panel-subsection > .rcpn-ui-panel-heading{
  align-items:flex-start;
  margin:0 0 12px;
  padding:0 0 12px;
  border-bottom:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-panel-subsection + .rcpn-ui-panel-subsection{
  margin-top:14px;
  padding-top:0;
  border-top:0;
}
body.rcpn-app-shell .rcpn-ui-panel-subsection__head{margin:0 0 10px;}
body.rcpn-app-shell .rcpn-ui-panel-subsection__head h3{
  margin:0;
  color:var(--rcpn-ui-text);
  font-size:12px;
  font-weight:550;
  line-height:1.35;
}
body.rcpn-app-shell .rcpn-ui-panel-subsection__head p{
  margin:3px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  line-height:1.45;
}
body.rcpn-app-shell .rcpn-ui-panel-body{
  min-width:0;
  padding:var(--rcpn-ui-panel-padding);
}
body.rcpn-app-shell .rcpn-ui-panel--sectioned > .rcpn-ui-panel-body--flush{
  margin:0 calc(-1 * var(--rcpn-ui-panel-padding)) calc(-1 * var(--rcpn-ui-panel-padding));
  padding:0;
}

/* Reusable adapter for legacy WordPress postboxes that are moved into RCP pages. */
body.rcpn-app-shell .rcpn-ui-legacy-card.postbox{
  min-width:0;
  margin:0;
  padding:0;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius);
  background:var(--rcpn-ui-surface);
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-legacy-card .postbox-header{
  min-height:0;
  padding:12px var(--rcpn-ui-panel-padding) 0;
  border:0;
  background:transparent;
}
body.rcpn-app-shell .rcpn-ui-legacy-card .postbox-header h2{
  margin:0;
  padding:0;
  color:var(--rcpn-ui-text);
  font-size:14.5px;
  line-height:1.3;
  font-weight:500;
}
body.rcpn-app-shell .rcpn-ui-legacy-card .postbox-header .handle-actions,
body.rcpn-app-shell .rcpn-ui-legacy-card .postbox-header .handlediv,
body.rcpn-app-shell .rcpn-ui-legacy-card .postbox-header .hndle::after{display:none;}
body.rcpn-app-shell .rcpn-ui-legacy-card .inside{
  margin:0;
  padding:12px var(--rcpn-ui-panel-padding) var(--rcpn-ui-panel-padding);
  border:0;
}
body.rcpn-app-shell .rcpn-ui-legacy-card--no-heading .postbox-header{display:none;}
body.rcpn-app-shell .rcpn-ui-legacy-card--no-heading .inside{padding:0;}

/* Shared action groups. */
body.rcpn-app-shell .rcpn-ui-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:var(--rcpn-ui-space-2);
}
body.rcpn-app-shell .rcpn-ui-actions--start{justify-content:flex-start;}
body.rcpn-app-shell .rcpn-ui-actions--end{justify-content:flex-end;}
body.rcpn-app-shell .rcpn-ui-actions--between{justify-content:space-between;}

/* Explicit semantic button variants. Standard WP `.button` / `.button-primary`
 * remain supported, but new UI should prefer these modifiers. */
body.rcpn-app-shell .button.rcpn-ui-button--primary{
  background:var(--rcpn-ui-accent);
  border-color:var(--rcpn-ui-accent);
  color:var(--rcpn-ui-accent-text);
}
body.rcpn-app-shell .button.rcpn-ui-button--secondary,
body.rcpn-app-shell .button.rcpn-ui-button--quiet{
  background:var(--rcpn-ui-surface);
  border-color:var(--rcpn-ui-border-strong);
  color:var(--rcpn-ui-text-soft);
}
body.rcpn-app-shell .button.rcpn-ui-button--danger{
  background:var(--rcpn-ui-surface);
  border-color:var(--rcpn-ui-danger-border);
  color:var(--rcpn-ui-danger);
}
body.rcpn-app-shell .button.rcpn-ui-button--sm{
  min-height:30px;
  height:30px;
  padding:0 10px;
  font-size:10.5px;
  line-height:28px;
}

/* Shared form layout. */
body.rcpn-app-shell .rcpn-ui-form-grid{
  display:grid;
  gap:14px;
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-form-grid--2{grid-template-columns:repeat(2,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-form-grid--3{grid-template-columns:repeat(3,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-field,
body.rcpn-app-shell .rcpn-ui-form-grid > label{
  display:grid;
  gap:5px;
  min-width:0;
  color:var(--rcpn-ui-text-soft);
  font-size:11px;
  font-weight:500;
}
body.rcpn-app-shell .rcpn-ui-field > span:first-child,
body.rcpn-app-shell .rcpn-ui-form-grid > label > span:first-child{
  color:var(--rcpn-ui-text-soft);
  font-size:11px;
  font-weight:500;
}
body.rcpn-app-shell .rcpn-ui-form-grid input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.rcpn-app-shell .rcpn-ui-form-grid select,
body.rcpn-app-shell .rcpn-ui-form-grid textarea{width:100%;max-width:none;}

/* Reusable polished labelled-field treatment for editable content panels.
 * This is intentionally opt-in via `.rcpn-ui-panel--form` so older workflow
 * surfaces can migrate onto the canonical field language without global regressions. */
body.rcpn-app-shell .rcpn-ui-panel--form .rcpn-ui-form-grid{
  column-gap:14px;
  row-gap:12px;
}
body.rcpn-app-shell .rcpn-ui-panel--form .rcpn-ui-field,
body.rcpn-app-shell .rcpn-ui-panel--form .rcpn-ui-form-grid > label{
  gap:6px;
}
body.rcpn-app-shell .rcpn-ui-panel--form .rcpn-ui-field > span:first-child,
body.rcpn-app-shell .rcpn-ui-panel--form .rcpn-ui-form-grid > label > span:first-child{
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  font-weight:550;
  letter-spacing:.01em;
  line-height:1.25;
}
body.rcpn-app-shell .rcpn-ui-panel--form .rcpn-ui-checkbox-field__label,
body.rcpn-app-shell .rcpn-ui-panel--form .rcpn-ui-radio-field legend{
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  font-weight:550;
  letter-spacing:.01em;
  line-height:1.25;
}
body.rcpn-app-shell .rcpn-ui-panel--form .rcpn-ui-radio-option{
  min-height:36px;
  box-sizing:border-box;
}
body.rcpn-app-shell .rcpn-ui-panel--form input[type="text"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="email"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="password"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="number"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="date"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="time"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="datetime-local"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="url"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="tel"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="search"],
body.rcpn-app-shell .rcpn-ui-panel--form select,
body.rcpn-app-shell .rcpn-ui-panel--form textarea{
  width:100%;
  max-width:none;
  border-color:var(--rcpn-ui-border);
  border-radius:8px;
  background:var(--rcpn-ui-surface-soft);
  color:var(--rcpn-ui-text);
  box-shadow:inset 0 1px 0 rgba(35,52,70,.015);
  transition:border-color .12s ease,background .12s ease,box-shadow .12s ease;
}
body.rcpn-app-shell .rcpn-ui-panel--form input[type="text"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="email"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="password"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="number"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="date"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="time"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="datetime-local"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="url"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="tel"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="search"],
body.rcpn-app-shell .rcpn-ui-panel--form select{
  min-height:36px;
  height:36px;
  padding-top:0;
  padding-bottom:0;
}
body.rcpn-app-shell .rcpn-ui-panel--form input[type="text"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="email"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="password"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="number"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="date"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="time"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="datetime-local"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="url"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="tel"],
body.rcpn-app-shell .rcpn-ui-panel--form input[type="search"]{
  padding-left:10px;
  padding-right:10px;
}
body.rcpn-app-shell .rcpn-ui-panel--form textarea{
  min-height:92px;
  padding:9px 10px;
  line-height:1.45;
  resize:vertical;
}
body.rcpn-app-shell .rcpn-ui-panel--form input::placeholder,
body.rcpn-app-shell .rcpn-ui-panel--form textarea::placeholder{
  color:var(--rcpn-ui-muted-2);
  opacity:1;
}
body.rcpn-app-shell .rcpn-ui-panel--form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
body.rcpn-app-shell .rcpn-ui-panel--form select:hover,
body.rcpn-app-shell .rcpn-ui-panel--form textarea:hover{
  border-color:var(--rcpn-ui-border-strong);
  background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-ui-panel--form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
body.rcpn-app-shell .rcpn-ui-panel--form select:focus,
body.rcpn-app-shell .rcpn-ui-panel--form textarea:focus{
  border-color:var(--rcpn-ui-accent);
  background:var(--rcpn-ui-surface);
  box-shadow:0 0 0 3px var(--rcpn-ui-accent-soft);
}
body.rcpn-app-shell .rcpn-ui-panel--form input[readonly],
body.rcpn-app-shell .rcpn-ui-panel--form textarea[readonly],
body.rcpn-app-shell .rcpn-ui-panel--form select:disabled{
  border-color:var(--rcpn-ui-border);
  background:#f6f8fa;
  color:var(--rcpn-ui-muted);
}
body.rcpn-app-shell .rcpn-ui-panel--form .rcpn-ui-field small,
body.rcpn-app-shell .rcpn-ui-panel--form .rcpn-ui-field .description{
  margin-top:-1px;
  color:var(--rcpn-ui-muted-2);
  font-size:10px;
  line-height:1.35;
}
body.rcpn-app-shell .rcpn-ui-summary-card--profile{
  cursor:pointer;
}
body.rcpn-app-shell .rcpn-ui-summary-card--profile:hover,
body.rcpn-app-shell .rcpn-ui-summary-card--profile:focus-visible{
  border-color:var(--rcpn-ui-accent-border);
  background:var(--rcpn-ui-accent-soft);
}


/* Shared lookup/search result used by modal and form searches. */
body.rcpn-app-shell .rcpn-ui-lookup-result{
  display:block;
  width:100%;
  margin:0;
  padding:9px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--rcpn-ui-text);
  font:inherit;
  text-align:left;
  text-decoration:none;
  cursor:pointer;
}
body.rcpn-app-shell .rcpn-ui-lookup-result:hover,
body.rcpn-app-shell .rcpn-ui-lookup-result:focus-visible{
  background:var(--rcpn-ui-accent-soft);
  color:var(--rcpn-ui-text);
  outline:0;
}
body.rcpn-app-shell .rcpn-ui-lookup-result strong{
  display:block;
  color:var(--rcpn-ui-text);
  font-weight:550;
}
body.rcpn-app-shell .rcpn-ui-lookup-result span{
  display:block;
  margin-top:2px;
  color:var(--rcpn-ui-muted);
  font-size:11.5px;
}

/* Shared selectable-option layout. */
body.rcpn-app-shell .rcpn-ui-choice-grid{
  display:grid;
  gap:6px;
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-choice-grid--2{grid-template-columns:repeat(2,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-choice-grid--3{grid-template-columns:repeat(3,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-choice-grid > .rcpn-ui-choice-option{width:100%;}

/* Shared small metric cards (balances, totals, compact account states). */
body.rcpn-app-shell .rcpn-ui-metric-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--rcpn-ui-space-2);
}
body.rcpn-app-shell .rcpn-ui-metric{
  padding:10px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface-soft);
}
body.rcpn-app-shell .rcpn-ui-metric > span{
  display:block;
  color:var(--rcpn-ui-muted);
  font-size:10px;
  line-height:1.25;
}
body.rcpn-app-shell .rcpn-ui-metric > strong{
  display:block;
  margin-top:3px;
  color:var(--rcpn-ui-text);
  font-size:16px;
  font-weight:500;
  line-height:1.15;
}

/* Shared clickable operational/action card used by dashboard/work queues. */
body.rcpn-app-shell .rcpn-ui-action-card{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  min-width:0;
  min-height:94px;
  gap:var(--rcpn-ui-space-3);
  padding:14px 15px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-text);
  box-shadow:none;
  transition:border-color .13s ease,box-shadow .13s ease,transform .13s ease,background .13s ease;
}
body.rcpn-app-shell .rcpn-ui-action-card.is-clickable{cursor:pointer;}
body.rcpn-app-shell .rcpn-ui-action-card.is-clickable:hover,
body.rcpn-app-shell .rcpn-ui-action-card.is-clickable:focus-visible{
  border-color:var(--rcpn-ui-border-strong);
  box-shadow:var(--rcpn-ui-shadow-hover);
  transform:translateY(-1px);
  outline:none;
}
/* Shared amber state for outstanding, non-exception operational notifications. */
body.rcpn-app-shell .rcpn-dashboard-notification-card.is-pending.has-action{
  background:#fffaf0;
  border-color:#e9d39c;
}
body.rcpn-app-shell .rcpn-dashboard-notification-card.is-pending.has-action .rcpn-ui-action-card-count{
  background:#dfac30;
  border-color:#c59525;
  color:#302810;
}
body.rcpn-app-shell .rcpn-ui-action-card.is-alert{
  background:var(--rcpn-ui-danger-bg);
  border-color:var(--rcpn-ui-danger-border);
}
body.rcpn-app-shell .rcpn-ui-action-card h2{
  margin:0;
  color:var(--rcpn-ui-text);
  font-size:14.5px;
  line-height:1.28;
  font-weight:500;
}
body.rcpn-app-shell .rcpn-ui-action-card p{
  margin:6px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:12.25px;
  line-height:1.4;
  font-weight:400;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
}
body.rcpn-app-shell .rcpn-ui-action-card h2{
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
}
body.rcpn-app-shell .rcpn-ui-action-card-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:30px;
  height:30px;
  padding:0 8px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-pill);
  background:#f5f7f9;
  color:#5f6e80;
  font-size:12.5px;
  font-weight:500;
  line-height:1;
}
body.rcpn-app-shell .rcpn-ui-action-card.is-alert.has-action .rcpn-ui-action-card-count{
  border-color:var(--rcpn-ui-danger);
  background:var(--rcpn-ui-danger);
  color:#fff;
}
body.rcpn-app-shell .rcpn-ui-action-card.is-alert.no-action .rcpn-ui-action-card-count{
  border-color:var(--rcpn-ui-danger-border);
  background:#fff0f1;
  color:var(--rcpn-ui-danger-text);
}



/* Canonical content helpers used across profiles and module pages. */
body.rcpn-app-shell .rcpn-ui-card-description{
  margin:3px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:11px;
  font-weight:400;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-ui-subheading{
  display:block;
  margin:0 0 10px;
  padding:0;
  color:var(--rcpn-ui-text);
  font-size:14px;
  font-weight:500;
  line-height:1.3;
}
body.rcpn-app-shell .button.rcpn-ui-edit-action{
  min-height:28px;
  height:28px;
  padding:0 8px;
  font-size:10.5px;
  line-height:26px;
}
body.rcpn-app-shell .rcpn-ui-note-editor{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:var(--rcpn-ui-space-2);
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-note-editor__field{
  box-sizing:border-box;
  width:100%;
  max-width:none;
  min-height:116px;
  margin:0;
  padding:10px;
  resize:vertical;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-text);
  font-size:11.5px;
  line-height:1.5;
}
body.rcpn-app-shell .rcpn-ui-status-summary{
  display:inline-flex;
  align-items:center;
  max-width:100%;
  padding:4px 8px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-pill);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-muted);
  font-size:10.75px;
  line-height:1.25;
  font-weight:400;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-status-summary.is-success{
  border-color:var(--rcpn-ui-success-border);
  background:var(--rcpn-ui-success-bg);
  color:var(--rcpn-ui-success-text);
}
body.rcpn-app-shell .rcpn-ui-status-summary.is-warning{
  border-color:var(--rcpn-ui-warning-border);
  background:var(--rcpn-ui-warning-bg);
  color:var(--rcpn-ui-warning);
}
body.rcpn-app-shell .rcpn-ui-status-summary strong{font-weight:550;color:inherit;}
body.rcpn-app-shell .rcpn-ui-status-summary.is-link{cursor:pointer;}

/* Canonical compact record-list pattern for modal utilities and secondary records. */
body.rcpn-app-shell .rcpn-ui-record-list{
  display:grid;
  gap:var(--rcpn-ui-space-2);
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-record-item{
  box-sizing:border-box;
  min-width:0;
  padding:11px 12px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-ui-record-item__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:var(--rcpn-ui-space-3);
  margin:0 0 7px;
}
body.rcpn-app-shell .rcpn-ui-record-item__head strong{
  color:var(--rcpn-ui-text);
  font-size:12px;
  font-weight:500;
  line-height:1.35;
}
body.rcpn-app-shell .rcpn-ui-record-item__meta{
  display:flex;
  flex-wrap:wrap;
  gap:4px 14px;
  margin:0 0 8px;
  color:var(--rcpn-ui-text-soft);
  font-size:11px;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-ui-record-item__meta > span{display:inline-block;}
body.rcpn-app-shell .rcpn-ui-empty-copy{
  margin:0;
  color:var(--rcpn-ui-muted);
  font-size:11.5px;
  line-height:1.45;
}
body.rcpn-app-shell .rcpn-ui-file-input{
  display:block;
  width:100%;
  max-width:none;
  margin:0;
  color:var(--rcpn-ui-text-soft);
  font-size:11px;
}

/* Standard legacy renderer adapters. These are intentionally global so older
 * CPT renderers can be placed inside the RCP shell without recreating card/form CSS. */
body.rcpn-app-shell .rcpn-ui-legacy-flat{
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-legacy-flat > .rcpn-plan-section-content{padding:0;}
body.rcpn-app-shell .rcpn-ui-legacy-flat > .rcpn-plan-section-label{display:none;}
body.rcpn-app-shell .rcpn-ui-form-grid .description,
body.rcpn-app-shell .rcpn-ui-field .description,
body.rcpn-app-shell .rcpn-ui-form-grid small,
body.rcpn-app-shell .rcpn-ui-field small{
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  font-weight:400;
  line-height:1.4;
}

@media(max-width:1600px){
  body.rcpn-app-shell .rcpn-ui-grid--responsive.rcpn-ui-grid--4{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:1180px){
  body.rcpn-app-shell .rcpn-ui-grid--responsive.rcpn-ui-grid--3{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.rcpn-app-shell .rcpn-ui-grid--responsive.rcpn-ui-grid--4{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.rcpn-app-shell .rcpn-ui-grid--responsive.rcpn-ui-grid--5{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:780px){
  body.rcpn-app-shell .rcpn-ui-grid--responsive.rcpn-ui-grid--2,
  body.rcpn-app-shell .rcpn-ui-grid--responsive.rcpn-ui-grid--3,
  body.rcpn-app-shell .rcpn-ui-grid--responsive.rcpn-ui-grid--4{grid-template-columns:1fr;}
  body.rcpn-app-shell .rcpn-ui-grid--responsive.rcpn-ui-grid--5{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.rcpn-app-shell .rcpn-ui-form-grid--2,
  body.rcpn-app-shell .rcpn-ui-form-grid--3,
  body.rcpn-app-shell .rcpn-ui-choice-grid--2,
  body.rcpn-app-shell .rcpn-ui-choice-grid--3,
  body.rcpn-app-shell .rcpn-ui-metric-grid{grid-template-columns:1fr;}
  body.rcpn-app-shell .rcpn-ui-section-heading,
  body.rcpn-app-shell .rcpn-ui-section-divider{grid-template-columns:1fr;align-items:start;}
  body.rcpn-app-shell .rcpn-ui-section-heading__actions{justify-content:flex-start;}
}
@media(max-width:520px){
  body.rcpn-app-shell .rcpn-ui-grid--responsive.rcpn-ui-grid--5{grid-template-columns:1fr;}
}

/* Host wrapper for rendered components that need to fill a grid cell. */
body.rcpn-app-shell .rcpn-ui-card-host{
  display:flex;
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-card-host > .rcpn-ui-panel,
body.rcpn-app-shell .rcpn-ui-card-host > .rcpn-ui-card{
  flex:1 1 auto;
  width:100%;
  min-width:0;
}

body.rcpn-app-shell .rcpn-ui-block-gap{margin-bottom:var(--rcpn-ui-gap);}
body.rcpn-app-shell .rcpn-ui-panel-heading--balanced{min-height:54px;}
body.rcpn-app-shell .rcpn-ui-panel-heading--compact{margin-bottom:7px;}
body.rcpn-app-shell .rcpn-ui-empty-state--compact{
  display:flex;
  align-items:center;
  min-height:54px;
}

/* v1.0.18.562 — canonical RCP archive/list page system.
 * This is global by design: CPT archive screens consume these classes while
 * WordPress continues to supply the underlying list-table behaviour.
 */
body.rcpn-app-shell{
  --rcpn-ui-archive-toolbar-gap:8px;
  --rcpn-ui-archive-row-min-height:52px;
}

/* Archive pages use the same canonical 24px page canvas as every RCP screen,
 * with a flush full-width inverse header at the top. */
body.rcpn-app-shell.rcpn-shell-archive #wpbody-content > .wrap.rcpn-ui-archive{
  box-sizing:border-box;
  width:100%;
  max-width:none;
  margin:0;
  padding:0 var(--rcpn-ui-page-padding) var(--rcpn-ui-page-padding);
}

/* Generic page-header primitive. Profiles and archives can both consume this. */
body.rcpn-app-shell .rcpn-ui-page-header{
  position:sticky;
  top:0;
  z-index:90;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  min-height:86px;
  padding-top:14px;
  padding-bottom:14px;
}
body.rcpn-app-shell .rcpn-ui-page-header-copy{min-width:0;}
body.rcpn-app-shell .rcpn-ui-page-eyebrow{
  display:block;
  margin:0 0 4px;
  color:var(--rcpn-ui-inverse-muted);
  font-size:10.5px;
  font-weight:500;
  line-height:1.2;
  letter-spacing:.055em;
}
body.rcpn-app-shell .rcpn-ui-page-title{
  margin:0;
  padding:0;
  color:var(--rcpn-ui-inverse-text);
  font-size:23px;
  font-weight:450;
  line-height:1.2;
  letter-spacing:-.015em;
}
body.rcpn-app-shell .rcpn-ui-page-description{
  margin:4px 0 0;
  color:var(--rcpn-ui-inverse-muted);
  font-size:11.5px;
  font-weight:400;
  line-height:1.35;
}
body.rcpn-app-shell .rcpn-ui-page-header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:6px;
}
body.rcpn-app-shell .rcpn-ui-page-header-actions .button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  height:32px;
  margin:0;
  padding:0 10px;
  font-size:11.5px;
  line-height:30px;
}
body.rcpn-app-shell .rcpn-ui-header-action-group{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}
body.rcpn-app-shell .rcpn-ui-header-action-group--workflow .button{
  background:var(--rcpn-ui-surface);
  border-color:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-text-soft);
}
body.rcpn-app-shell .rcpn-ui-header-action-group--workflow .button:hover,
body.rcpn-app-shell .rcpn-ui-header-action-group--workflow .button:focus{
  background:var(--rcpn-ui-surface-soft);
  border-color:var(--rcpn-ui-surface-soft);
  color:var(--rcpn-ui-text);
}
body.rcpn-app-shell .rcpn-ui-header-action-group--profiles .button{
  background:var(--rcpn-ui-accent);
  border-color:var(--rcpn-ui-accent);
  color:var(--rcpn-ui-accent-text);
}
body.rcpn-app-shell .rcpn-ui-header-action-group--profiles .button:hover,
body.rcpn-app-shell .rcpn-ui-header-action-group--profiles .button:focus{
  background:var(--rcpn-ui-accent-hover);
  border-color:var(--rcpn-ui-accent-hover);
  color:var(--rcpn-ui-accent-text);
}
/* Separate record/workflow actions from contextual profile actions in dark headers. */
body.rcpn-app-shell .rcpn-ui-header-action-group--workflow + .rcpn-ui-header-action-group--profiles{
  margin-left:4px;
  padding-left:10px;
  border-left:1px solid rgba(255,255,255,.22);
}

body.rcpn-app-shell .rcpn-ui-archive-header{
  margin-bottom:var(--rcpn-ui-page-padding);
}

/* Record status/view navigation. */
body.rcpn-app-shell .rcpn-ui-archive > .rcpn-ui-archive-views{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  float:none;
  width:auto;
  margin:0 0 12px;
  padding:0;
  color:var(--rcpn-ui-muted);
  font-size:12px;
  line-height:1;
}
body.rcpn-app-shell .rcpn-ui-archive-views li{
  float:none;
  margin:0;
  padding:0;
}
body.rcpn-app-shell .rcpn-ui-archive-views a{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  box-sizing:border-box;
  padding:0 10px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-pill);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-muted);
  font-size:11.5px;
  font-weight:450;
  line-height:28px;
  text-decoration:none;
}
body.rcpn-app-shell .rcpn-ui-archive-views a:hover,
body.rcpn-app-shell .rcpn-ui-archive-views a:focus-visible{
  border-color:var(--rcpn-ui-border-strong);
  color:var(--rcpn-ui-text-soft);
  outline:none;
}
body.rcpn-app-shell .rcpn-ui-archive-views a.current{
  border-color:var(--rcpn-ui-accent-border);
  background:var(--rcpn-ui-accent-soft);
  color:var(--rcpn-ui-accent-ink);
}
body.rcpn-app-shell .rcpn-ui-archive-views .count{color:inherit;font-weight:inherit;}

/* Main archive form / toolbars. */
body.rcpn-app-shell .rcpn-ui-archive-form{margin:0;}
body.rcpn-app-shell .rcpn-ui-archive-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:var(--rcpn-ui-archive-toolbar-gap);
  min-height:0;
  height:auto;
  margin:0 0 12px;
  padding:0;
  clear:both;
}
body.rcpn-app-shell .rcpn-ui-archive-toolbar .actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  margin:0;
  padding:0;
}
body.rcpn-app-shell .rcpn-ui-archive-toolbar .actions > *{margin:0;}
body.rcpn-app-shell .rcpn-ui-archive-toolbar select{
  width:auto;
  min-width:138px;
  max-width:220px;
  padding-right:30px;
}
body.rcpn-app-shell .rcpn-ui-archive-search{
  position:static;
  display:flex;
  align-items:center;
  gap:6px;
  float:none;
  margin:0 0 0 auto;
}
body.rcpn-app-shell .rcpn-ui-archive-search label{display:block;margin:0;}
body.rcpn-app-shell .rcpn-ui-archive-search input[type="search"],
body.rcpn-app-shell .rcpn-ui-archive-search input[type="text"]{
  width:240px;
  min-width:180px;
  margin:0;
}
body.rcpn-app-shell .rcpn-ui-archive-search .button{margin:0;}
body.rcpn-app-shell .rcpn-ui-archive-toolbar .tablenav-pages{
  display:none;
}

/* Native WP_List_Table adapted to the canonical RCP data-table system. */
body.rcpn-app-shell .rcpn-ui-archive-table{
  table-layout:auto;
  margin:0;
  border-collapse:separate;
  border-spacing:0;
}
body.rcpn-app-shell .rcpn-ui-archive-table thead th,
body.rcpn-app-shell .rcpn-ui-archive-table thead td{
  position:static;
  height:auto;
  padding:9px 10px;
  border:0;
  border-bottom:1px solid var(--rcpn-ui-table-head-border);
  background:var(--rcpn-ui-table-head-bg);
  color:var(--rcpn-ui-text);
  font-size:var(--rcpn-ui-table-head-size);
  font-weight:500;
  line-height:1.3;
  vertical-align:middle;
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-archive-table tbody tr{min-height:var(--rcpn-ui-archive-row-min-height);}
body.rcpn-app-shell .rcpn-ui-archive-table tbody th,
body.rcpn-app-shell .rcpn-ui-archive-table tbody td{
  height:auto;
  min-height:0;
  padding:12px 10px;
  border:0;
  border-bottom:1px solid var(--rcpn-ui-table-row-border);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-text-soft);
  font-size:var(--rcpn-ui-table-body-size);
  line-height:1.4;
  vertical-align:middle;
}
body.rcpn-app-shell .rcpn-ui-archive-table tbody tr:last-child th,
body.rcpn-app-shell .rcpn-ui-archive-table tbody tr:last-child td{border-bottom:0;}
body.rcpn-app-shell .rcpn-ui-archive-table tfoot{display:none;}
body.rcpn-app-shell .rcpn-ui-archive-table .check-column{
  width:36px;
  padding-left:10px;
  padding-right:6px;
  text-align:center;
  vertical-align:middle;
}
body.rcpn-app-shell .rcpn-ui-archive-table .check-column input[type="checkbox"]{
  width:16px;
  height:16px;
  min-height:16px;
  margin:0;
}
body.rcpn-app-shell .rcpn-ui-archive-table .row-title{
  color:var(--rcpn-ui-link);
  font-size:12.5px;
  font-weight:500;
  text-decoration:none;
}
body.rcpn-app-shell .rcpn-ui-archive-table .row-actions{
  margin:4px 0 0;
  color:var(--rcpn-ui-muted-2);
  font-size:10.5px;
  line-height:1.3;
}
body.rcpn-app-shell .rcpn-ui-archive-table .row-actions a{
  color:var(--rcpn-ui-muted);
  text-decoration:none;
}
body.rcpn-app-shell .rcpn-ui-archive-table .row-actions a:hover{color:var(--rcpn-ui-text-soft);}
body.rcpn-app-shell .rcpn-ui-archive-table .sorting-indicators{opacity:.55;}
body.rcpn-app-shell .rcpn-ui-archive-table th.sorted a,
body.rcpn-app-shell .rcpn-ui-archive-table th.sortable a{
  color:inherit;
  font-weight:inherit;
}

/* Existing invoice/claim workflow badges adopt the quiet RCP status-chip language
 * when displayed in a canonical archive table. */
body.rcpn-app-shell .rcpn-ui-archive-table .rcpn-admin-badge{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:2px 8px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-pill);
  background:var(--rcpn-ui-surface-soft);
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  font-weight:500;
  line-height:1.25;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-archive-table .rcpn-admin-badge-paid,
body.rcpn-app-shell .rcpn-ui-archive-table .rcpn-admin-badge-completed,
body.rcpn-app-shell .rcpn-ui-archive-table .rcpn-admin-badge-approved,
body.rcpn-app-shell .rcpn-ui-archive-table .rcpn-admin-badge-settled{
  border-color:var(--rcpn-ui-success-border);
  background:var(--rcpn-ui-success-bg);
  color:var(--rcpn-ui-success);
}
body.rcpn-app-shell .rcpn-ui-archive-table .rcpn-admin-badge-pending-payment,
body.rcpn-app-shell .rcpn-ui-archive-table .rcpn-admin-badge-part-paid,
body.rcpn-app-shell .rcpn-ui-archive-table .rcpn-admin-badge-awaiting-insurance-claim,
body.rcpn-app-shell .rcpn-ui-archive-table .rcpn-admin-badge-payment-plan-active,
body.rcpn-app-shell .rcpn-ui-archive-table .rcpn-admin-badge-ready-to-dispense,
body.rcpn-app-shell .rcpn-ui-archive-table .rcpn-admin-badge-submitted,
body.rcpn-app-shell .rcpn-ui-archive-table .rcpn-admin-badge-part-approved{
  border-color:var(--rcpn-ui-warning-border);
  background:var(--rcpn-ui-warning-bg);
  color:var(--rcpn-ui-warning);
}
body.rcpn-app-shell .rcpn-ui-archive-table .rcpn-admin-badge-rejected{
  border-color:var(--rcpn-ui-danger-border);
  background:var(--rcpn-ui-danger-bg);
  color:var(--rcpn-ui-danger-text);
}

/* One clean bottom pagination row; duplicated bottom bulk controls are removed. */
body.rcpn-app-shell .rcpn-ui-archive-pagination{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  min-height:0;
  height:auto;
  margin:12px 0 0;
  padding:0;
}
body.rcpn-app-shell .rcpn-ui-archive-pagination .alignleft.actions{display:none;}
body.rcpn-app-shell .rcpn-ui-archive-pagination .tablenav-pages{
  display:flex;
  align-items:center;
  gap:6px;
  float:none;
  margin:0;
  color:var(--rcpn-ui-muted);
  font-size:11.5px;
}
body.rcpn-app-shell .rcpn-ui-archive-pagination .tablenav-pages-navspan,
body.rcpn-app-shell .rcpn-ui-archive-pagination .page-numbers,
body.rcpn-app-shell .rcpn-ui-archive-pagination .button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  min-width:32px;
  height:32px;
  margin:0;
  padding:0 8px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-text-soft);
  box-shadow:none;
  text-decoration:none;
}
body.rcpn-app-shell .rcpn-ui-archive-pagination .tablenav-pages-navspan{opacity:.45;}
body.rcpn-app-shell .rcpn-ui-archive-pagination .current-page{
  width:54px;
  min-height:32px;
  height:32px;
  margin:0 4px;
  text-align:center;
}
body.rcpn-app-shell .rcpn-ui-archive-pagination .displaying-num{margin-right:8px;}

/* WordPress notices still work, but sit inside the RCP canvas rather than carrying
 * legacy admin margins/shadows. */
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive > .notice,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive > .update-nag{
  margin:0 0 12px;
  border-radius:var(--rcpn-ui-radius-sm);
  box-shadow:none;
}

@media(max-width:980px){
  body.rcpn-app-shell .rcpn-ui-page-header{
    flex-direction:column;
    align-items:flex-start;
  }
  body.rcpn-app-shell .rcpn-ui-page-header-actions{justify-content:flex-start;}
  body.rcpn-app-shell .rcpn-ui-archive-search{width:100%;margin-left:0;}
  body.rcpn-app-shell .rcpn-ui-archive-search label{flex:1 1 auto;}
  body.rcpn-app-shell .rcpn-ui-archive-search input[type="search"],
  body.rcpn-app-shell .rcpn-ui-archive-search input[type="text"]{width:100%;}
}

/* v1.0.18.563 — archive interaction hardening.
 * Keep native WordPress select-all labels from ever becoming an invisible
 * click surface over archive controls, and make archive rows visually static.
 */
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-toolbar,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-views,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-search{
  position:relative;
  z-index:3;
}
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table{
  position:relative;
  z-index:1;
}
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table .check-column label{
  position:static;
  inset:auto;
  width:auto;
  height:auto;
  margin:0;
  padding:0;
  pointer-events:none;
}
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table .check-column label .screen-reader-text{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tbody tr:hover > th,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tbody tr:hover > td,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tbody tr:focus-within > th,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tbody tr:focus-within > td{
  background:var(--rcpn-ui-surface);
}


/* v1.0.18.564 — canonical archive/table alignment polish.
 * WordPress gives sortable primary columns their own padded anchor, which can
 * make the heading taller than adjacent headings and make header/body columns
 * look misaligned. RCP normalises that native structure here globally. */
body.rcpn-app-shell .rcpn-ui-archive-views a{
  gap:4px;
}
body.rcpn-app-shell .rcpn-ui-archive-views .count{
  display:inline-block;
  margin-left:1px;
}

body.rcpn-app-shell .rcpn-ui-archive-table thead th.sortable,
body.rcpn-app-shell .rcpn-ui-archive-table thead th.sorted{
  padding:var(--rcpn-ui-table-head-pad-y) 10px;
  background:var(--rcpn-ui-table-head-bg);
}
body.rcpn-app-shell .rcpn-ui-archive-table thead th.sortable > a,
body.rcpn-app-shell .rcpn-ui-archive-table thead th.sorted > a{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-height:0;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  color:inherit;
  font:inherit;
  line-height:1.3;
  text-decoration:none;
  vertical-align:middle;
}
body.rcpn-app-shell .rcpn-ui-archive-table thead th.sortable > a:hover,
body.rcpn-app-shell .rcpn-ui-archive-table thead th.sorted > a:hover,
body.rcpn-app-shell .rcpn-ui-archive-table thead th.sortable > a:focus,
body.rcpn-app-shell .rcpn-ui-archive-table thead th.sorted > a:focus{
  background:transparent;
  color:var(--rcpn-ui-text);
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-archive-table .sorting-indicators{
  display:inline-flex;
  flex:0 0 auto;
  flex-direction:column;
  justify-content:center;
  width:10px;
  height:16px;
  margin:0;
  vertical-align:middle;
}
body.rcpn-app-shell .rcpn-ui-archive-table .sorting-indicator{
  position:static;
  margin:0;
}

/* Keep every archive column on the same horizontal/vertical rhythm. */
body.rcpn-app-shell .rcpn-ui-archive-table thead th:not(.check-column),
body.rcpn-app-shell .rcpn-ui-archive-table tbody td:not(.check-column){
  padding-left:10px;
  padding-right:10px;
}
body.rcpn-app-shell .rcpn-ui-archive-table tbody td.column-primary{
  vertical-align:middle;
}
body.rcpn-app-shell .rcpn-ui-archive-table tbody td.column-primary > strong{
  display:flex;
  align-items:center;
  min-height:22px;
  margin:0;
  padding:0;
  color:var(--rcpn-ui-text-soft);
  font-size:var(--rcpn-ui-table-body-size);
  font-weight:500;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-ui-archive-table tbody td.column-primary .row-title{
  display:inline;
  color:var(--rcpn-ui-link);
  font:inherit;
  font-weight:500;
  line-height:inherit;
  vertical-align:middle;
}

/* A subtle colour treatment is global: quiet cool-tinted headers, white rows.
 * Deliberately no zebra striping or default row hover, keeping the interface airy. */
body.rcpn-app-shell .rcpn-ui-table th,
body.rcpn-app-shell .rcpn-ui-panel > .widefat th,
body.rcpn-app-shell .rcpn-ui-archive-table thead th,
body.rcpn-app-shell .rcpn-ui-archive-table thead td{
  background:var(--rcpn-ui-table-head-bg);
  border-bottom-color:var(--rcpn-ui-table-head-border);
}

/* v1.0.18.565 — profile-detail cohesion + non-sortable archive headings.
 * Detail rows are a global visual primitive. Legacy module classes must not
 * reintroduce boxed rows/backgrounds. Archive tables are filter-driven, so
 * canonical RCP archive headings are intentionally non-sortable. */
body.rcpn-app-shell .rcpn-ui-detail-list{
  display:grid;
  gap:0;
}
body.rcpn-app-shell .rcpn-ui-detail-row{
  display:block;
  min-width:0;
  padding:9px 0;
  border:0;
  border-bottom:1px solid var(--rcpn-ui-border);
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-detail-row:last-child{
  border-bottom:0;
}
body.rcpn-app-shell .rcpn-ui-detail-row > span,
body.rcpn-app-shell .rcpn-ui-detail-row > div > span{
  display:block;
  margin:0 0 2px;
  color:var(--rcpn-ui-muted-2);
  font-size:10px;
  font-weight:450;
  line-height:1.3;
}
body.rcpn-app-shell .rcpn-ui-detail-row > strong,
body.rcpn-app-shell .rcpn-ui-detail-row > div > strong{
  display:block;
  min-width:0;
  overflow-wrap:anywhere;
  color:var(--rcpn-ui-text-soft);
  font-size:11.5px;
  font-weight:500;
  line-height:1.35;
}

/* Canonical archive headers: one treatment for every column, no ordering UI. */
body.rcpn-app-shell .rcpn-ui-archive-table thead th,
body.rcpn-app-shell .rcpn-ui-archive-table thead td,
body.rcpn-app-shell .rcpn-ui-archive-table thead th.sorted,
body.rcpn-app-shell .rcpn-ui-archive-table thead th.sortable,
body.rcpn-app-shell .rcpn-ui-archive-table thead th.column-primary{
  padding:var(--rcpn-ui-table-head-pad-y) 10px;
  text-align:left;
  border:0;
  border-bottom:1px solid var(--rcpn-ui-table-head-border);
  background:var(--rcpn-ui-table-head-bg);
  color:var(--rcpn-ui-text);
  font-size:var(--rcpn-ui-table-head-size);
  font-weight:500;
  line-height:1.3;
  text-decoration:none;
  vertical-align:middle;
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-archive-table thead th > a,
body.rcpn-app-shell .rcpn-ui-archive-table thead th.sorted > a,
body.rcpn-app-shell .rcpn-ui-archive-table thead th.sortable > a{
  display:block;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  line-height:inherit;
  text-decoration:none;
  box-shadow:none;
  pointer-events:none;
  cursor:default;
}
body.rcpn-app-shell .rcpn-ui-archive-table .sorting-indicators,
body.rcpn-app-shell .rcpn-ui-archive-table .sorting-indicator{
  display:none;
}


/* v1.0.18.567 — global regression cleanup / canonical component adapters.
 * These rules intentionally live here rather than in Client/Patient modules.
 * They adapt legacy renderer markup to the RCP design system without !important. */

/* Legacy section adapters: remove the old 190px label/content grid when a
 * renderer is consumed inside a modern RCP card or modal. */
body.rcpn-app-shell .rcpn-ui-legacy-flat.rcpn-plan-panel,
body.rcpn-app-shell .rcpn-ui-legacy-flat.rcpn-plan-section{
  display:block;
  width:100%;
  max-width:none;
  min-width:0;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-legacy-flat.rcpn-plan-section > .rcpn-plan-section-content,
body.rcpn-app-shell .rcpn-ui-legacy-flat .rcpn-plan-section-content{
  display:block;
  width:100%;
  max-width:none;
  min-width:0;
  margin:0;
  padding:0;
}
body.rcpn-app-shell .rcpn-ui-legacy-section--stacked.rcpn-plan-section{
  display:block;
  grid-template-columns:none;
  gap:0;
  width:100%;
  max-width:none;
  min-width:0;
  margin:0;
  align-items:initial;
}
body.rcpn-app-shell .rcpn-ui-legacy-section--stacked > .rcpn-plan-section-content{
  display:block;
  width:100%;
  max-width:none;
  min-width:0;
  margin:0;
  padding:0;
}

/* Described legacy postboxes use exactly the same title/subtitle grammar as
 * native RCP cards. */
body.rcpn-app-shell .rcpn-ui-legacy-card--described .postbox-header{
  display:block;
}
body.rcpn-app-shell .rcpn-ui-legacy-card--described .postbox-header .rcpn-ui-card-description{
  margin:3px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:11px;
  font-weight:400;
  line-height:1.4;
}

/* Canonical modal action sizing. Content determines labels; the global modal
 * determines button geometry, icon alignment and primary/secondary treatment. */
body.rcpn-app-shell .rcpn-ui-modal .button,
body.rcpn-app-shell .rcpn-ui-modal .button-secondary,
body.rcpn-app-shell .rcpn-ui-modal .button-primary,
body.rcpn-app-shell .rcpn-ui-modal .button-small,
body.rcpn-app-shell .rcpn-ui-modal .rcpn-print-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  box-sizing:border-box;
  min-height:var(--rcpn-ui-modal-action-height);
  height:var(--rcpn-ui-modal-action-height);
  margin:0;
  padding:0 10px;
  font-size:11.5px;
  font-weight:450;
  line-height:1.2;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-modal .button .dashicons,
body.rcpn-app-shell .rcpn-ui-modal .rcpn-print-button .dashicons{
  flex:0 0 14px;
  width:14px;
  height:14px;
  margin:0;
  font-size:14px;
  line-height:14px;
}
body.rcpn-app-shell .rcpn-ui-modal .button-primary,
body.rcpn-app-shell .rcpn-ui-modal .button.rcpn-ui-button--primary{
  background:var(--rcpn-ui-accent);
  border-color:var(--rcpn-ui-accent);
  color:var(--rcpn-ui-accent-text);
}
body.rcpn-app-shell .rcpn-ui-modal .button-primary:hover,
body.rcpn-app-shell .rcpn-ui-modal .button-primary:focus,
body.rcpn-app-shell .rcpn-ui-modal .button.rcpn-ui-button--primary:hover,
body.rcpn-app-shell .rcpn-ui-modal .button.rcpn-ui-button--primary:focus{
  background:var(--rcpn-ui-accent-hover);
  border-color:var(--rcpn-ui-accent-hover);
  color:var(--rcpn-ui-accent-text);
}
body.rcpn-app-shell .rcpn-ui-modal td .rcpn-ui-actions{
  align-items:center;
  flex-wrap:nowrap;
}
body.rcpn-app-shell .rcpn-ui-modal td .rcpn-ui-actions .button{
  min-width:64px;
}
body.rcpn-app-shell .rcpn-ui-modal .rcpn-print-label-control{
  display:inline-flex;
  align-items:center;
  margin:0;
}

/* Archive rows have a single explicit open target: the record title. Native
 * WordPress hover row-actions are not part of the RCP archive language. */
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table .row-actions{
  display:none;
}
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tbody td.column-primary,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tbody th.column-primary{
  vertical-align:middle;
}
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tbody td.column-primary > strong{
  display:flex;
  align-items:center;
  min-height:32px;
  margin:0;
}


/* v1.0.18.575 — canonical app-level notification/toast system.
 * App-level WordPress notices are hidden from first paint and translated by
 * rcpn-ui.js into compact RCP feedback. This prevents the native notice from
 * briefly pushing the application header down before JavaScript captures it.
 * Inline workflow notices remain in their local context. */
body.rcpn-app-shell #wpbody-content > #message,
body.rcpn-app-shell #wpbody-content > .notice.notice-success,
body.rcpn-app-shell #wpbody-content > .notice.notice-error,
body.rcpn-app-shell #wpbody-content > .notice.notice-warning,
body.rcpn-app-shell #wpbody-content > .notice.notice-info,
body.rcpn-app-shell #wpbody-content > .wrap > #message,
body.rcpn-app-shell #wpbody-content > .wrap > .notice.notice-success,
body.rcpn-app-shell #wpbody-content > .wrap > .notice.notice-error,
body.rcpn-app-shell #wpbody-content > .wrap > .notice.notice-warning,
body.rcpn-app-shell #wpbody-content > .wrap > .notice.notice-info{
  display:none;
}
body.rcpn-app-shell .rcpn-ui-toast-region{
  position:fixed;
  left:calc(var(--rcpn-shell-rail) + var(--rcpn-ui-page-padding));
  bottom:var(--rcpn-ui-page-padding);
  z-index:100100;
  display:grid;
  gap:8px;
  width:min(360px, calc(100vw - var(--rcpn-shell-rail) - (var(--rcpn-ui-page-padding) * 2)));
  pointer-events:none;
  transition:left .18s ease;
}
body.rcpn-app-shell.rcpn-shell-nav-open .rcpn-ui-toast-region{
  left:calc(var(--rcpn-shell-rail) + var(--rcpn-shell-nav) + var(--rcpn-ui-page-padding));
}
body.rcpn-app-shell .rcpn-ui-toast{
  display:grid;
  grid-template-columns:8px minmax(0,1fr) 24px;
  align-items:center;
  gap:10px;
  box-sizing:border-box;
  min-height:48px;
  padding:9px 10px 9px 12px;
  border:1px solid var(--rcpn-ui-border-strong);
  border-radius:var(--rcpn-ui-radius);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-text-soft);
  box-shadow:0 12px 34px rgba(29,43,58,.14);
  opacity:0;
  transform:translateY(8px);
  pointer-events:auto;
  transition:opacity .16s ease,transform .16s ease;
}
body.rcpn-app-shell .rcpn-ui-toast--success{
  border-color:var(--rcpn-ui-success);
  background:var(--rcpn-ui-success);
  color:#fff;
}
body.rcpn-app-shell .rcpn-ui-toast--success .rcpn-ui-toast-indicator{
  background:rgba(255,255,255,.9);
}
body.rcpn-app-shell .rcpn-ui-toast--success .rcpn-ui-toast-close{
  color:rgba(255,255,255,.88);
}
body.rcpn-app-shell .rcpn-ui-toast--success .rcpn-ui-toast-close:hover,
body.rcpn-app-shell .rcpn-ui-toast--success .rcpn-ui-toast-close:focus-visible{
  background:rgba(255,255,255,.14);
  color:#fff;
}
body.rcpn-app-shell .rcpn-ui-toast.is-visible{
  opacity:1;
  transform:translateY(0);
}
body.rcpn-app-shell .rcpn-ui-toast.is-leaving{
  opacity:0;
  transform:translateY(6px);
}
body.rcpn-app-shell .rcpn-ui-toast-indicator{
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--rcpn-ui-accent);
}
body.rcpn-app-shell .rcpn-ui-toast--warning .rcpn-ui-toast-indicator{background:var(--rcpn-ui-warning);}
body.rcpn-app-shell .rcpn-ui-toast--error .rcpn-ui-toast-indicator{background:var(--rcpn-ui-danger);}
body.rcpn-app-shell .rcpn-ui-toast-copy{
  min-width:0;
  font-size:12.5px;
  font-weight:450;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-ui-toast-close{
  display:flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  margin:0;
  padding:0;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--rcpn-ui-muted);
  font:inherit;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}
body.rcpn-app-shell .rcpn-ui-toast-close:hover,
body.rcpn-app-shell .rcpn-ui-toast-close:focus-visible{
  background:var(--rcpn-ui-surface-hover);
  color:var(--rcpn-ui-text);
  outline:none;
}
@media (max-width:782px){
  body.rcpn-app-shell .rcpn-ui-toast-region,
  body.rcpn-app-shell.rcpn-shell-nav-open .rcpn-ui-toast-region{
    left:calc(var(--rcpn-shell-rail) + 14px);
    right:14px;
    bottom:14px;
    width:auto;
  }
}


/* v1.0.18.576 — global transactional/workflow primitives used by Invoice first,
 * but intentionally available to any RCP module. */
body.rcpn-app-shell .rcpn-ui-grid--3-1{
  grid-template-columns:minmax(0,3fr) minmax(300px,1fr);
}
body.rcpn-app-shell .rcpn-ui-sticky-column{
  position:sticky;
  top:calc(86px + var(--rcpn-ui-page-padding));
  align-self:start;
}
body.rcpn-app-shell .rcpn-ui-summary-card.rcpn-ui-summary-card--plain{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:stretch;
  gap:3px;
  min-width:0;
  min-height:60px;
  padding:10px 12px;
  color:var(--rcpn-ui-text);
  text-align:left;
}
body.rcpn-app-shell .rcpn-ui-summary-card.rcpn-ui-summary-card--plain .rcpn-ui-summary-label,
body.rcpn-app-shell .rcpn-ui-summary-card.rcpn-ui-summary-card--plain .rcpn-ui-summary-value{
  width:100%;
  text-align:left;
}
body.rcpn-app-shell a.rcpn-ui-summary-card--plain{
  cursor:pointer;
}
body.rcpn-app-shell div.rcpn-ui-summary-card--plain:hover{
  border-color:var(--rcpn-ui-border);
  background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-ui-summary-card--plain .rcpn-ui-summary-label{
  margin:0;
}
body.rcpn-app-shell .rcpn-ui-summary-card--plain .rcpn-ui-summary-value{
  display:block;
  min-width:0;
  overflow:hidden;
  color:var(--rcpn-ui-text);
  font-size:13.5px;
  font-weight:500;
  line-height:1.3;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-table-wrap{
  width:100%;
  min-width:0;
  overflow-x:auto;
}
body.rcpn-app-shell .rcpn-ui-table--transactional{
  min-width:820px;
}
body.rcpn-app-shell .rcpn-ui-table--transactional th,
body.rcpn-app-shell .rcpn-ui-table--transactional td{
  vertical-align:middle;
}
body.rcpn-app-shell .rcpn-ui-transaction-actions{
  margin:0 0 10px;
}
body.rcpn-app-shell .rcpn-ui-money-summary__rows{
  display:flex;
  flex-direction:column;
  border-top:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-money-summary__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:34px;
  padding:7px 0;
  border-bottom:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-money-summary__row span{
  color:var(--rcpn-ui-muted);
  font-size:11px;
}
body.rcpn-app-shell .rcpn-ui-money-summary__row strong{
  color:var(--rcpn-ui-text);
  font-size:12px;
  font-weight:500;
  text-align:right;
}
body.rcpn-app-shell .rcpn-ui-money-summary__total{
  margin-top:4px;
  padding:12px 0 4px;
  border-bottom:0;
}
body.rcpn-app-shell .rcpn-ui-money-summary__total span{
  color:var(--rcpn-ui-text-soft);
  font-size:12px;
  font-weight:500;
}
body.rcpn-app-shell .rcpn-ui-money-summary__total strong{
  color:var(--rcpn-ui-text);
  font-size:22px;
  font-weight:550;
  letter-spacing:-.02em;
}
body.rcpn-app-shell .rcpn-ui-workflow-list{
  display:flex;
  flex-direction:column;
  border-top:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-workflow-item{
  display:grid;
  grid-template-columns:minmax(110px,.7fr) minmax(0,1.3fr);
  gap:12px;
  padding:11px 0;
  border-bottom:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-workflow-item__title{
  color:var(--rcpn-ui-text);
  font-size:11.5px;
  font-weight:500;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-ui-workflow-item__content{
  min-width:0;
  color:var(--rcpn-ui-muted);
  font-size:11px;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-ui-workflow-item__content > :first-child{margin-top:0;}
body.rcpn-app-shell .rcpn-ui-workflow-item__content > :last-child{margin-bottom:0;}
body.rcpn-app-shell .rcpn-ui-workflow-item__content p{
  margin:0 0 7px;
}
body.rcpn-app-shell .rcpn-ui-workflow-item__content .description{
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
}
body.rcpn-app-shell .rcpn-ui-workflow-item__content .button{
  margin:2px 5px 2px 0;
}
body.rcpn-app-shell .rcpn-ui-alert-strip{
  padding:11px 13px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-text-soft);
}
body.rcpn-app-shell .rcpn-ui-alert-strip--warning{
  border-color:var(--rcpn-ui-warning-border);
  background:var(--rcpn-ui-warning-bg);
}
body.rcpn-app-shell .rcpn-ui-alert-strip--icon{
  display:flex;
  align-items:flex-start;
  gap:10px;
}
body.rcpn-app-shell .rcpn-ui-alert-strip__icon{
  flex:0 0 18px;
  width:18px;
  height:18px;
  margin-top:1px;
  color:var(--rcpn-ui-muted);
  font-size:18px;
  line-height:18px;
}
body.rcpn-app-shell .rcpn-ui-alert-strip__copy{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-alert-strip__copy strong{
  color:var(--rcpn-ui-text);
  font-size:12px;
  font-weight:550;
}
body.rcpn-app-shell .rcpn-ui-alert-strip__copy span,
body.rcpn-app-shell .rcpn-ui-alert-strip__copy p{
  margin:0;
  color:var(--rcpn-ui-muted);
  font-size:11.5px;
  line-height:1.45;
}
body.rcpn-app-shell .rcpn-ui-alert-strip > :first-child{margin-top:0;}
body.rcpn-app-shell .rcpn-ui-alert-strip > :last-child{margin-bottom:0;}
body.rcpn-app-shell .rcpn-ui-modal-section + .rcpn-ui-modal-section{
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-modal-section > h3{
  margin:0 0 10px;
  padding:0;
  color:var(--rcpn-ui-text);
  font-size:13px;
  font-weight:550;
  line-height:1.3;
}
body.rcpn-app-shell .rcpn-ui-legacy-form > p{
  margin:0;
}
body.rcpn-app-shell .rcpn-ui-legacy-form input[type="text"],
body.rcpn-app-shell .rcpn-ui-legacy-form input[type="number"],
body.rcpn-app-shell .rcpn-ui-legacy-form input[type="date"],
body.rcpn-app-shell .rcpn-ui-legacy-form input[type="search"],
body.rcpn-app-shell .rcpn-ui-legacy-form select,
body.rcpn-app-shell .rcpn-ui-legacy-form textarea{
  box-sizing:border-box;
  width:100%;
  max-width:none;
}
body.rcpn-app-shell .rcpn-ui-legacy-form .rcpn-side-history{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:0 0 8px;
}
body.rcpn-app-shell .rcpn-ui-legacy-form .rcpn-side-history-item{
  padding:9px 10px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface-soft);
}
body.rcpn-app-shell .rcpn-ui-muted-copy{
  margin:0;
  color:var(--rcpn-ui-muted);
  font-size:11px;
}

/* Legacy picker-modal adapter. Existing functional modal markup can consume the
 * same canonical modal geometry without being rebuilt module by module. */
body.rcpn-app-shell .rcpn-modal{
  display:none;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  padding:24px;
}
body.rcpn-app-shell .rcpn-modal.is-open{display:flex;}
body.rcpn-app-shell .rcpn-modal .rcpn-modal-backdrop{
  background:var(--rcpn-ui-modal-backdrop);
}
body.rcpn-app-shell .rcpn-modal .rcpn-modal-dialog{
  display:flex;
  flex-direction:column;
  width:min(var(--rcpn-ui-modal-width-wide),calc(100vw - 48px));
  max-height:calc(100vh - 48px);
  margin:0;
  padding:0;
  overflow:hidden;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-modal-radius);
  background:var(--rcpn-ui-surface);
  box-shadow:var(--rcpn-ui-modal-shadow);
}
body.rcpn-app-shell .rcpn-modal .rcpn-modal-header{
  flex:0 0 auto;
  padding:var(--rcpn-ui-modal-header-padding);
  border:0;
  border-bottom:1px solid var(--rcpn-ui-border);
  background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-modal .rcpn-modal-header h2{
  margin:0;
  color:var(--rcpn-ui-text);
  font-size:18px;
  font-weight:500;
  line-height:1.3;
}
body.rcpn-app-shell .rcpn-modal .rcpn-modal-body{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:var(--rcpn-ui-modal-content-padding);
}
body.rcpn-app-shell .rcpn-modal .rcpn-modal-footer{
  flex:0 0 auto;
  padding:var(--rcpn-ui-modal-footer-padding);
  border:0;
  border-top:1px solid var(--rcpn-ui-border);
  background:var(--rcpn-ui-surface-soft);
}
body.rcpn-app-shell .rcpn-modal .rcpn-modal-close{
  color:var(--rcpn-ui-muted);
  font-size:20px;
  text-decoration:none;
}



/* Shared clinical/workflow primitives used across Cases, Surgery, Hospital and Invoice. */
body.rcpn-app-shell .rcpn-ui-status-chip.is-accent{
  border-color:var(--rcpn-ui-accent-border);
  background:var(--rcpn-ui-accent-soft);
  color:var(--rcpn-ui-accent-ink);
}

/* Canonical episode progress tracker. Modules only choose the stage count/density. */
body.rcpn-app-shell .rcpn-ui-progress-tracker{
  box-sizing:border-box;
  margin:0 0 12px;
  padding:13px 16px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius);
  background:var(--rcpn-ui-surface);
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker ol{
  display:grid;
  gap:0;
  margin:0;
  padding:0;
  border:0;
  list-style:none;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--3 ol{grid-template-columns:repeat(3,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-progress-tracker--4 ol{grid-template-columns:repeat(4,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-progress-tracker--5 ol{grid-template-columns:repeat(5,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-progress-tracker--7 ol{grid-template-columns:repeat(7,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-progress-tracker--8 ol{grid-template-columns:repeat(8,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-progress-tracker--9 ol{grid-template-columns:repeat(9,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-progress-tracker li{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding-right:22px;
  color:var(--rcpn-ui-muted);
}
body.rcpn-app-shell .rcpn-ui-progress-tracker li:not(:last-child)::after{
  content:"";
  position:absolute;
  z-index:0;
  top:15px;
  right:6px;
  left:42px;
  height:2px;
  background:var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-progress-tracker li.is-complete:not(:last-child)::after{
  background:var(--rcpn-ui-success-border);
}
body.rcpn-app-shell .rcpn-ui-progress-tracker__marker{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 30px;
  width:30px;
  height:30px;
  border:2px solid var(--rcpn-ui-border-strong);
  border-radius:50%;
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-muted);
  font-size:11px;
  font-weight:600;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker li > span:last-child{
  position:relative;
  z-index:1;
  min-width:0;
  padding:2px 4px;
  background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-ui-progress-tracker strong,
body.rcpn-app-shell .rcpn-ui-progress-tracker small{
  display:block;
  min-width:0;
  background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-ui-progress-tracker strong{
  overflow:hidden;
  color:var(--rcpn-ui-text-soft);
  font-size:12px;
  font-weight:500;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker small{
  margin-top:2px;
  overflow:hidden;
  color:var(--rcpn-ui-muted);
  font-size:10px;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker li.is-complete .rcpn-ui-progress-tracker__marker{
  border-color:var(--rcpn-ui-success-border);
  background:var(--rcpn-ui-success-bg);
  color:var(--rcpn-ui-success);
}
body.rcpn-app-shell .rcpn-ui-progress-tracker li.is-current .rcpn-ui-progress-tracker__marker{
  border-color:var(--rcpn-ui-accent);
  background:var(--rcpn-ui-accent);
  color:var(--rcpn-ui-accent-text);
  box-shadow:0 0 0 3px var(--rcpn-ui-accent-soft);
}
body.rcpn-app-shell .rcpn-ui-progress-tracker li.is-current strong{color:var(--rcpn-ui-text);}
body.rcpn-app-shell .rcpn-ui-progress-tracker--dense li{gap:8px;padding-right:18px;}
body.rcpn-app-shell .rcpn-ui-progress-tracker--dense li:not(:last-child)::after{top:14px;left:29px;right:2px;height:1px;}
body.rcpn-app-shell .rcpn-ui-progress-tracker--dense .rcpn-ui-progress-tracker__marker{
  flex-basis:28px;
  width:28px;
  height:28px;
  font-size:10px;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--dense strong{font-size:10.5px;line-height:1.25;}
body.rcpn-app-shell .rcpn-ui-progress-tracker--dense small{margin-top:1px;font-size:9px;line-height:1.2;}

/* Primary workspace panel. Use when one content card is the page's active work area.
   This is the shared treatment first established by Invoice Line Items. */
body.rcpn-app-shell .rcpn-ui-panel--primary-workspace{
  min-width:0;
  padding-top:12px;
  border-color:var(--rcpn-ui-accent-border);
  border-top:3px solid var(--rcpn-ui-accent);
  box-shadow:0 2px 10px rgba(63,88,113,.055);
}
body.rcpn-app-shell .rcpn-ui-panel--primary-workspace > .rcpn-ui-panel-heading{
  margin-bottom:12px;
  padding-bottom:10px;
  border-bottom:1px solid var(--rcpn-ui-accent-border);
}
body.rcpn-app-shell .rcpn-ui-panel--primary-workspace > .rcpn-ui-panel-heading h2,
body.rcpn-app-shell .rcpn-ui-panel--primary-workspace > .rcpn-ui-panel-heading h3{
  color:var(--rcpn-ui-accent-ink);
  font-size:16px;
  font-weight:600;
}
body.rcpn-app-shell .rcpn-ui-panel--primary-workspace > .rcpn-ui-panel-heading p{
  margin-top:3px;
}
body.rcpn-app-shell .rcpn-ui-panel--primary-workspace .rcpn-ui-table-wrap{
  border-color:var(--rcpn-ui-border-strong);
}

/* Optional stacked tracker layout for dense workflows with longer stage names.
   Stage widths follow their content; dedicated flex connectors fill the space between them. */
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked ol{
  display:flex;
  align-items:flex-end;
  gap:0;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked li:not(.rcpn-ui-progress-tracker__connector){
  position:relative;
  display:flex;
  flex:0 0 auto;
  flex-direction:column;
  align-items:stretch;
  gap:0;
  width:auto;
  min-width:0;
  padding-right:0;
  text-align:center;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked li::after{display:none;}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked .rcpn-ui-progress-tracker__connector{
  display:flex;
  flex:1 1 0;
  align-self:flex-end;
  align-items:center;
  min-width:16px;
  height:28px;
  padding:0;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked .rcpn-ui-progress-tracker__connector::before{
  content:"";
  width:100%;
  height:1px;
  background:var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked .rcpn-ui-progress-tracker__connector.is-complete::before{
  background:var(--rcpn-ui-success-border);
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked .rcpn-ui-progress-tracker__label{
  position:relative;
  z-index:1;
  order:1;
  display:block;
  width:auto;
  height:auto;
  min-width:0;
  min-height:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:inherit;
  font-size:inherit;
  font-weight:inherit;
  line-height:inherit;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked .rcpn-ui-progress-tracker__marker-row{
  position:relative;
  z-index:1;
  order:2;
  display:grid;
  grid-template-columns:1fr 28px 1fr;
  align-items:center;
  width:100%;
  height:28px;
  margin-top:2px;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked .rcpn-ui-progress-tracker__line{
  display:block;
  height:1px;
  background:var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked li.is-complete .rcpn-ui-progress-tracker__line{
  background:var(--rcpn-ui-success-border);
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked li.is-first .rcpn-ui-progress-tracker__line--before,
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked li.is-last .rcpn-ui-progress-tracker__line--after{
  visibility:hidden;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked .rcpn-ui-progress-tracker__marker{
  z-index:2;
  box-sizing:border-box;
  align-self:center;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked strong{
  overflow:visible;
  text-overflow:clip;
  white-space:nowrap;
  text-align:center;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked .rcpn-ui-progress-tracker__link{
  display:flex;
  flex:0 0 auto;
  flex-direction:column;
  align-items:stretch;
  gap:0;
  width:100%;
  min-width:0;
  color:inherit;
  text-decoration:none;
  box-shadow:none;
  outline:0;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked .rcpn-ui-progress-tracker__link:focus,
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked .rcpn-ui-progress-tracker__link:active{
  color:inherit;
  text-decoration:none;
  box-shadow:none;
  outline:0;
}
body.rcpn-app-shell .rcpn-ui-progress-tracker--stacked .rcpn-ui-progress-tracker__link:focus-visible .rcpn-ui-progress-tracker__marker{
  outline:2px solid var(--rcpn-ui-accent);
  outline-offset:3px;
}

/* Canonical workflow action rail. */
body.rcpn-app-shell .rcpn-ui-workflow-actions-panel{position:static;min-width:0;}
body.rcpn-app-shell .rcpn-ui-workflow-actions-panel .rcpn-ui-kicker,
body.rcpn-app-shell .rcpn-ui-workflow-actions-panel .rcpn-kicker{
  display:block;
  margin:0 0 3px;
  color:var(--rcpn-ui-muted);
  font-size:9.5px;
  font-weight:500;
  letter-spacing:.055em;
  text-transform:uppercase;
}
body.rcpn-app-shell .rcpn-ui-workflow-actions-panel__buttons{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:8px;
  padding:10px 0 0;
}
body.rcpn-app-shell .rcpn-ui-workflow-actions-panel__buttons .button{
  flex:0 0 auto;
  width:auto;
  min-height:34px;
  margin:0;
  text-align:center;
}
body.rcpn-app-shell .rcpn-ui-workflow-actions-panel__buttons .button-primary,
body.rcpn-app-shell .rcpn-ui-workflow-actions-panel__buttons .button.rcpn-ui-button--primary{
  background:var(--rcpn-ui-accent);
  border-color:var(--rcpn-ui-accent);
  color:var(--rcpn-ui-accent-text);
}
body.rcpn-app-shell .rcpn-ui-workflow-actions-panel__buttons > .description{
  flex:1 0 100%;
  margin:0;
  color:var(--rcpn-ui-muted);
  font-size:10px;
  line-height:1.4;
}

/* Canonical two-column linked-record surface, shared by Master Case and episodes. */
body.rcpn-app-shell .rcpn-ui-linked-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 18px;
  min-width:0;
  padding:4px 0 0;
}
body.rcpn-app-shell .rcpn-ui-linked-record{
  display:grid;
  grid-template-columns:26px minmax(0,1fr) auto;
  align-items:center;
  gap:9px;
  min-width:0;
  min-height:48px;
  padding:10px 0;
  border:0;
  border-bottom:1px solid var(--rcpn-ui-border);
  border-radius:0;
  background:transparent;
}
body.rcpn-app-shell .rcpn-ui-linked-record__icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:26px;
  height:26px;
  border-radius:6px;
  background:var(--rcpn-ui-accent-soft);
  color:var(--rcpn-ui-accent);
  font-size:14px;
  line-height:26px;
}
body.rcpn-app-shell .rcpn-ui-linked-record__copy{min-width:0;}
body.rcpn-app-shell .rcpn-ui-linked-record__copy small{
  display:block;
  color:var(--rcpn-ui-muted);
  font-size:9.5px;
  font-weight:500;
  line-height:1.3;
}
body.rcpn-app-shell .rcpn-ui-linked-record__copy strong{
  display:block;
  margin-top:2px;
  overflow:hidden;
  color:var(--rcpn-ui-text);
  font-size:11.5px;
  font-weight:500;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-linked-record__copy span{
  display:block;
  margin-top:3px;
  color:var(--rcpn-ui-muted);
  font-size:9.5px;
  line-height:1.35;
}
body.rcpn-app-shell .rcpn-ui-linked-record__actions{display:flex;align-items:center;gap:6px;}
body.rcpn-app-shell .rcpn-ui-linked-record__actions .button{margin:0;white-space:nowrap;}
body.rcpn-app-shell .rcpn-ui-linked-grid > .rcpn-ui-linked-record:last-child,
body.rcpn-app-shell .rcpn-ui-linked-grid > .rcpn-ui-linked-record:nth-last-child(2):nth-child(odd){border-bottom:0;}


/* Canonical supporting-file list for staff clinical workflows. */
body.rcpn-app-shell .rcpn-ui-file-list{
  display:grid;
  gap:0;
  margin-top:10px;
  border-top:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-file-row{
  display:grid;
  grid-template-columns:24px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:8px 0;
  border-bottom:1px solid var(--rcpn-ui-border);
  color:var(--rcpn-ui-text);
  text-decoration:none;
}
body.rcpn-app-shell .rcpn-ui-file-row:last-child{border-bottom:0;}
body.rcpn-app-shell .rcpn-ui-file-row .dashicons{color:var(--rcpn-ui-accent);}
body.rcpn-app-shell .rcpn-ui-file-row strong{overflow:hidden;font-size:11.5px;font-weight:500;text-overflow:ellipsis;white-space:nowrap;}
body.rcpn-app-shell .rcpn-ui-file-row small{color:var(--rcpn-ui-muted);font-size:9.5px;}
body.rcpn-app-shell .rcpn-ui-file-row:hover strong{text-decoration:underline;}

/* Canonical clinical-note history surface. Data ownership remains module-specific. */
body.rcpn-app-shell .rcpn-ui-clinical-notes-panel .rcpn-ui-panel-heading{margin-bottom:0;}
body.rcpn-app-shell .rcpn-ui-clinical-notes-panel .rcpn-clinical-notes-box{display:block;margin:0;}
body.rcpn-app-shell .rcpn-ui-clinical-notes-panel .rcpn-clinical-note-pet-block{
  margin:0;
  padding:10px 0 0;
  border:0;
  border-radius:0;
  background:transparent;
}
body.rcpn-app-shell .rcpn-ui-clinical-notes-panel .rcpn-clinical-note-pet-block + .rcpn-clinical-note-pet-block{
  margin-top:10px;
  padding-top:12px;
  border-top:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-clinical-notes-panel .rcpn-clinical-note-pet-block h4{
  margin:0;
  color:var(--rcpn-ui-text);
  font-size:12px;
  font-weight:600;
}
body.rcpn-app-shell .rcpn-ui-clinical-notes-panel .rcpn-clinical-notes-log{margin:0;}
body.rcpn-app-shell .rcpn-ui-clinical-notes-panel .rcpn-clinical-note-entry{
  margin:0;
  padding:8px 0;
  border:0;
  border-top:1px solid var(--rcpn-ui-border);
  border-radius:0;
  background:transparent;
}
body.rcpn-app-shell .rcpn-ui-clinical-notes-panel .rcpn-clinical-note-entry:first-child{border-top:0;}
body.rcpn-app-shell .rcpn-ui-clinical-notes-panel .rcpn-clinical-note-meta{
  margin:0 0 4px;
  color:var(--rcpn-ui-text-soft);
  font-size:11px;
  line-height:1.35;
}
body.rcpn-app-shell .rcpn-ui-clinical-notes-panel .rcpn-clinical-note-body{
  color:var(--rcpn-ui-text);
  font-size:11.5px;
  line-height:1.45;
}
body.rcpn-app-shell .rcpn-ui-clinical-notes-panel .rcpn-clinical-note-body p{margin:0 0 6px;}
body.rcpn-app-shell .rcpn-ui-clinical-notes-panel .rcpn-clinical-note-body p:last-child{margin-bottom:0;}
body.rcpn-app-shell .rcpn-ui-clinical-notes-panel .rcpn-ui-clinical-note-count{
  margin:1px 0 5px;
  color:var(--rcpn-ui-text-soft);
  font-size:10.5px;
}
body.rcpn-app-shell .rcpn-ui-clinical-notes-panel .rcpn-ui-clinical-note-empty{
  margin:0;
  padding:9px 0 1px;
  color:var(--rcpn-ui-text-soft);
  font-size:11px;
}
body.rcpn-app-shell .rcpn-ui-clinical-note-modal textarea{min-height:120px;resize:vertical;}

/* Canonical compact stage list. Detailed stage fields remain owned by each workflow. */
/* Shared full-width workflow workspace: record actions belong in the contextual header, stage actions in the active stage. */
body.rcpn-app-shell .rcpn-ui-workspace--full{display:block;min-width:0;}
body.rcpn-app-shell .rcpn-ui-stage-list{display:block;gap:0;margin:0;min-width:0;}
/* Full-record stage processes use one shared inset inside the flush panel body.
 * Operational modal variants deliberately omit this class and retain their own compact composition. */
body.rcpn-app-shell .rcpn-ui-stage-process{padding:12px var(--rcpn-ui-panel-padding) 15px;}
body.rcpn-app-shell .rcpn-ui-stage-list > .description{
  margin:0;
  padding:10px 0;
  border-bottom:1px solid var(--rcpn-ui-border);
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-ui-stage-card{
  margin:0;
  padding:0;
  border:0;
  border-bottom:1px solid var(--rcpn-ui-border);
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-stage-card:last-child{border-bottom:0;}
/* Stage state is communicated by the status chip and editability, not by changing
 * the shared card geometry, padding, opacity or background. */
body.rcpn-app-shell .rcpn-ui-stage-card__head{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  min-height:48px;
  margin:0;
  padding:9px 0;
  list-style:none;
  cursor:pointer;
  background:transparent;
}
body.rcpn-app-shell .rcpn-ui-stage-card__head::-webkit-details-marker{display:none;}
body.rcpn-app-shell .rcpn-ui-stage-card__head::after{
  content:"›";
  flex:0 0 auto;
  margin-left:2px;
  color:var(--rcpn-ui-muted);
  font-size:18px;
  line-height:1;
  transform:rotate(90deg);
  transition:transform .15s ease;
}
body.rcpn-app-shell .rcpn-ui-stage-process > details.rcpn-ui-stage-card[open] > .rcpn-ui-stage-card__head{
  border-bottom:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell details.rcpn-ui-stage-card[open] > .rcpn-ui-stage-card__head::after{transform:rotate(-90deg);}
/* The stage title consumes the available row width so the status chip and
 * disclosure chevron form one consistent trailing control group on every workflow. */
body.rcpn-app-shell .rcpn-ui-stage-card__head > div:first-child{min-width:0;flex:1 1 auto;}
body.rcpn-app-shell .rcpn-ui-stage-card__head > .rcpn-ui-status-chip{flex:0 0 auto;margin-left:auto;}
body.rcpn-app-shell .rcpn-ui-stage-card__head .rcpn-ui-kicker,
body.rcpn-app-shell .rcpn-ui-stage-card__head .rcpn-kicker{
  display:block;
  margin:0 0 1px;
  color:var(--rcpn-ui-muted);
  font-size:9px;
  font-weight:500;
  letter-spacing:.04em;
  text-transform:uppercase;
}
body.rcpn-app-shell .rcpn-ui-stage-card__head h3{
  margin:0;
  color:var(--rcpn-ui-text-soft);
  font-size:12px;
  font-weight:550;
  line-height:1.35;
}
body.rcpn-app-shell .rcpn-ui-stage-card__body{padding:0 0 14px;}
body.rcpn-app-shell .rcpn-ui-stage-card:not([open]) .rcpn-ui-stage-card__body{display:none;}
/* Open stage rows share one quiet workspace treatment across Surgery, CT and Hospital.
 * The stage itself stays borderless; a soft surface and inset rail separate adjacent
 * expanded stages while the clinical requirement cards retain the stronger hierarchy. */
body.rcpn-app-shell .rcpn-ui-stage-process > details.rcpn-ui-stage-card[open]{
  background:var(--rcpn-ui-surface-soft);
  box-shadow:inset 3px 0 0 var(--rcpn-ui-accent-border);
}
body.rcpn-app-shell .rcpn-ui-stage-process > details.rcpn-ui-stage-card[open] > .rcpn-ui-stage-card__head{
  padding-right:10px;
  padding-left:12px;
}
body.rcpn-app-shell .rcpn-ui-stage-process > details.rcpn-ui-stage-card[open] > .rcpn-ui-stage-card__body{
  padding-right:12px;
  padding-bottom:16px;
  padding-left:12px;
}

/* Canonical tag/member picker for compact staff/team assignment. */
body.rcpn-app-shell .rcpn-ui-tag-picker{display:grid;gap:7px;}
body.rcpn-app-shell .rcpn-ui-tag-list{display:flex;flex-wrap:wrap;gap:6px;min-height:0;}
body.rcpn-app-shell .rcpn-ui-tag-list:empty{display:none;}
body.rcpn-app-shell .rcpn-ui-tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:26px;
  padding:3px 7px 3px 9px;
  border:1px solid var(--rcpn-ui-accent-border);
  border-radius:999px;
  background:var(--rcpn-ui-accent-soft);
  color:var(--rcpn-ui-accent-ink);
  font-size:10.5px;
  font-weight:500;
}
body.rcpn-app-shell .rcpn-ui-tag button{
  width:18px;
  height:18px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:inherit;
  cursor:pointer;
  line-height:16px;
}
body.rcpn-app-shell .rcpn-ui-tag-picker__add{display:flex;align-items:center;gap:7px;}
body.rcpn-app-shell .rcpn-ui-tag-picker__add input{min-width:0;}
body.rcpn-app-shell .rcpn-ui-tag-picker__add .button{flex:0 0 auto;}


@media(max-width:1180px){
  body.rcpn-app-shell .rcpn-ui-progress-tracker--7 ol,
  body.rcpn-app-shell .rcpn-ui-progress-tracker--8 ol{grid-template-columns:repeat(4,minmax(0,1fr));row-gap:12px;}
}
@media(max-width:860px){
}
@media(max-width:782px){
  body.rcpn-app-shell .rcpn-ui-progress-tracker ol{grid-template-columns:1fr;gap:10px;}
  body.rcpn-app-shell .rcpn-ui-progress-tracker li:not(:last-child)::after{
    top:30px;
    right:auto;
    bottom:-10px;
    left:14px;
    width:2px;
    height:auto;
  }
  body.rcpn-app-shell .rcpn-ui-progress-tracker strong,
  body.rcpn-app-shell .rcpn-ui-progress-tracker small,
  body.rcpn-app-shell .rcpn-ui-progress-tracker li > span:last-child{background:transparent;}
  body.rcpn-app-shell .rcpn-ui-workflow-actions-panel__buttons{flex-direction:column;align-items:stretch;}
  body.rcpn-app-shell .rcpn-ui-workflow-actions-panel__buttons .button{width:100%;}
  body.rcpn-app-shell .rcpn-ui-linked-grid{grid-template-columns:1fr;}
  body.rcpn-app-shell .rcpn-ui-linked-grid > .rcpn-ui-linked-record{border-bottom:1px solid var(--rcpn-ui-border);}
  body.rcpn-app-shell .rcpn-ui-linked-grid > .rcpn-ui-linked-record:last-child{border-bottom:0;}
}

@media(max-width:1180px){
  body.rcpn-app-shell .rcpn-ui-grid--3-1{grid-template-columns:minmax(0,2fr) minmax(280px,1fr);}
}
@media(max-width:980px){
  body.rcpn-app-shell .rcpn-ui-grid--3-1{grid-template-columns:minmax(0,1fr);}
  body.rcpn-app-shell .rcpn-ui-sticky-column{position:static;}
}
@media(max-width:782px){
  body.rcpn-app-shell .rcpn-ui-workflow-item{grid-template-columns:minmax(0,1fr);gap:5px;}
  body.rcpn-app-shell .rcpn-modal{padding:12px;}
  body.rcpn-app-shell .rcpn-modal .rcpn-modal-dialog{width:calc(100vw - 24px);max-height:calc(100vh - 24px);}
}

/* v1.0.18.602 — reusable picker/list surface for assigning catalogue items or staff. */
body.rcpn-app-shell .rcpn-ui-picker-section{
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-picker-section__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin:0 0 9px;
}
body.rcpn-app-shell .rcpn-ui-picker-section__head > div{
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-picker-section__head h3{
  margin:0;
  color:var(--rcpn-ui-text);
  font-size:11.5px;
  font-weight:500;
  line-height:1.35;
}
body.rcpn-app-shell .rcpn-ui-picker-section__head p{
  margin:3px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-ui-picker-section__head .button{
  flex:0 0 auto;
  margin:0;
}
body.rcpn-app-shell .rcpn-ui-assignment-list{
  min-width:0;
  border-top:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-assignment-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  min-height:44px;
  padding:8px 0;
  border-bottom:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-assignment-row__copy{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-assignment-row__copy strong{
  overflow:hidden;
  color:var(--rcpn-ui-text);
  font-size:11.5px;
  font-weight:500;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-assignment-row__copy span{
  overflow:hidden;
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-assignment-row__actions{
  display:flex;
  align-items:center;
  gap:6px;
}
body.rcpn-app-shell .rcpn-ui-assignment-row__actions .button,
body.rcpn-app-shell .rcpn-ui-assignment-row__actions .button-link-delete{
  margin:0;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-assignment-empty{
  margin:0;
  padding:10px 0;
  border-bottom:1px solid var(--rcpn-ui-border);
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-ui-directory-list{
  max-height:420px;
  margin-top:12px;
  overflow:auto;
  border-top:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-directory-row.is-selected{
  opacity:.62;
}
@media(max-width:780px){
  body.rcpn-app-shell .rcpn-ui-picker-section__head{
    align-items:stretch;
    flex-direction:column;
  }
  body.rcpn-app-shell .rcpn-ui-picker-section__head .button{
    align-self:flex-start;
  }
}

/* v1.0.18.603 — canonical clinical workflow stage internals.
 * These primitives are shared by stage-based RCP workflows so the content
 * inside an accordion follows the same shell language as the surrounding app. */
body.rcpn-app-shell .rcpn-ui-form-grid--4{grid-template-columns:repeat(4,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-form-grid--5{grid-template-columns:repeat(5,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-form-grid--6{grid-template-columns:repeat(6,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-field--wide{grid-column:1 / -1;}

body.rcpn-app-shell .rcpn-ui-stage-intro{
  margin:0;
  padding:10px 0;
  border-bottom:1px solid var(--rcpn-ui-border);
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  line-height:1.45;
}
body.rcpn-app-shell .rcpn-ui-stage-description,
body.rcpn-app-shell .rcpn-ui-stage-locked-copy{
  margin:12px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  line-height:1.45;
}
body.rcpn-app-shell .rcpn-ui-stage-completion{
  margin:12px 0 0;
  padding:9px 11px;
  border:1px solid var(--rcpn-ui-accent-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-accent-soft);
  color:var(--rcpn-ui-accent-ink);
  font-size:10.5px;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-ui-stage-section{
  min-width:0;
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-stage-section__head{
  min-width:0;
  margin:0 0 10px;
}
body.rcpn-app-shell .rcpn-ui-stage-section__head--actions{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
body.rcpn-app-shell .rcpn-ui-stage-section__head--actions > div:first-child{min-width:0;}
body.rcpn-app-shell .rcpn-ui-stage-section__head--actions .button{flex:0 0 auto;margin:0;}
body.rcpn-app-shell .rcpn-ui-stage-section__head h4{
  margin:0;
  color:var(--rcpn-ui-text);
  font-size:12px;
  font-weight:550;
  line-height:1.35;
}
body.rcpn-app-shell .rcpn-ui-stage-section__head p{
  margin:3px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  line-height:1.45;
}
/* Reusable stage content-card hierarchy. The stage accordion provides the workflow
 * boundary; these cards group the actual clinical requirements inside it. */
body.rcpn-app-shell .rcpn-ui-stage-content-card{
  min-width:0;
  margin-top:12px;
  padding:12px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-ui-stage-content-card > .rcpn-ui-stage-section__head{
  margin:0 0 10px;
  padding:0 0 9px;
  border-bottom:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-stage-content-card > .rcpn-ui-stage-section__head h4{
  font-size:13.5px;
  font-weight:600;
}
body.rcpn-app-shell .rcpn-ui-stage-content-card--secondary{
  background:var(--rcpn-ui-surface-soft);
}
body.rcpn-app-shell .rcpn-ui-stage-secondary{
  min-width:0;
  margin-top:18px;
  padding-top:14px;
  border-top:2px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-stage-secondary__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:0 0 2px;
}
body.rcpn-app-shell .rcpn-ui-stage-secondary__head > span{
  display:block;
  color:var(--rcpn-ui-muted);
  font-size:9.5px;
  font-weight:650;
  letter-spacing:.045em;
  line-height:1.3;
  text-transform:uppercase;
}
body.rcpn-app-shell .rcpn-ui-stage-secondary__action{
  flex:0 0 auto;
  margin:0;
}
body.rcpn-app-shell .rcpn-ui-stage-secondary > .rcpn-ui-stage-content-card{
  margin-top:10px;
}

/* Shared embedded workflow context. Used when one clinical workflow needs to
 * surface the state of a related workflow without visually competing with the
 * active stage itself. */
body.rcpn-app-shell .rcpn-ui-workflow-context{
  min-width:0;
  margin-top:14px;
  padding:14px;
  border:1px solid var(--rcpn-ui-accent-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface-soft);
}
body.rcpn-app-shell .rcpn-ui-workflow-context__head{
  min-width:0;
  margin:0 0 12px;
  padding:0 0 10px;
  border-bottom:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-workflow-context__head h4{
  margin:0;
  color:var(--rcpn-ui-text);
  font-size:13px;
  font-weight:600;
  line-height:1.35;
}
body.rcpn-app-shell .rcpn-ui-workflow-context__head p{
  margin:3px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  line-height:1.45;
}
body.rcpn-app-shell .rcpn-ui-workflow-context__grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
body.rcpn-app-shell .rcpn-ui-workflow-context__item{
  min-width:0;
  padding:9px 10px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-ui-workflow-context__item > span{
  display:block;
  margin:0 0 4px;
  color:var(--rcpn-ui-muted);
  font-size:9.5px;
  font-weight:600;
  letter-spacing:.025em;
  line-height:1.25;
  text-transform:uppercase;
}
body.rcpn-app-shell .rcpn-ui-workflow-context__item > strong{
  display:block;
  min-width:0;
  color:var(--rcpn-ui-text);
  font-size:12.5px;
  font-weight:550;
  line-height:1.35;
  overflow-wrap:anywhere;
}
body.rcpn-app-shell .rcpn-ui-workflow-context__item > strong .rcpn-ui-status-chip{
  vertical-align:top;
}
body.rcpn-app-shell .rcpn-ui-workflow-context__actions{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--rcpn-ui-border);
}
@media (max-width:1100px){
  body.rcpn-app-shell .rcpn-ui-workflow-context__grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:700px){
  body.rcpn-app-shell .rcpn-ui-workflow-context__grid{grid-template-columns:1fr;}
}

body.rcpn-app-shell .rcpn-ui-stage-subcontent{
  margin-top:10px;
  padding:10px 0 0;
  border-top:1px solid var(--rcpn-ui-border);
  color:var(--rcpn-ui-text-soft);
  font-size:10.5px;
  line-height:1.45;
}
body.rcpn-app-shell .rcpn-ui-stage-subcontent > :first-child{margin-top:0;}
body.rcpn-app-shell .rcpn-ui-stage-subcontent > :last-child{margin-bottom:0;}

body.rcpn-app-shell .rcpn-ui-checklist{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
body.rcpn-app-shell .rcpn-ui-check-option{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  min-height:36px;
  padding:0 10px;
  box-sizing:border-box;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface-soft);
  color:var(--rcpn-ui-text-soft);
  font-size:10.5px;
  font-weight:500;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-ui-check-option input[type="checkbox"],
body.rcpn-app-shell .rcpn-ui-check-option input[type="radio"]{
  flex:0 0 auto;
  width:16px;
  height:16px;
  min-width:16px;
  min-height:0;
  margin:0;
}
body.rcpn-app-shell .rcpn-ui-check-option em{color:var(--rcpn-ui-danger);font-style:normal;}
body.rcpn-app-shell .rcpn-ui-check-option:has(input:checked){
  border-color:var(--rcpn-ui-success-border);
  background:var(--rcpn-ui-success-bg);
}

body.rcpn-app-shell .rcpn-ui-radio-field{margin:0;padding:0;border:0;}
body.rcpn-app-shell .rcpn-ui-radio-field legend{
  margin:0 0 5px;
  color:var(--rcpn-ui-text-soft);
  font-size:11px;
  font-weight:500;
}
body.rcpn-app-shell .rcpn-ui-radio-options{display:flex;gap:7px;flex-wrap:wrap;}
body.rcpn-app-shell .rcpn-ui-radio-option{
  display:flex;
  align-items:center;
  gap:6px;
  min-height:36px;
  padding:0 10px;
  box-sizing:border-box;
  border:1px solid var(--rcpn-ui-border-strong);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-text-soft);
  font-size:10.5px;
}
body.rcpn-app-shell .rcpn-ui-radio-option input{margin:0;}
body.rcpn-app-shell .rcpn-ui-radio-option:has(input:checked){
  border-color:var(--rcpn-ui-accent-border);
  background:var(--rcpn-ui-accent-soft);
  color:var(--rcpn-ui-accent-ink);
}

body.rcpn-app-shell .rcpn-ui-stage-split{
  display:grid;
  grid-template-columns:minmax(240px,.72fr) minmax(0,1.28fr);
  gap:14px;
  align-items:start;
}
body.rcpn-app-shell .rcpn-ui-stage-split > .rcpn-ui-stage-section{margin-top:14px;}

body.rcpn-app-shell .rcpn-ui-stage-wizard{
  margin-top:14px;
  overflow:hidden;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius);
  background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-ui-stage-wizard__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:12px 14px;
  border-bottom:1px solid var(--rcpn-ui-border);
  background:var(--rcpn-ui-surface-soft);
}
body.rcpn-app-shell .rcpn-ui-stage-wizard__head h4{margin:2px 0 2px;color:var(--rcpn-ui-text);font-size:13px;font-weight:550;}
body.rcpn-app-shell .rcpn-ui-stage-wizard__head p{margin:0;color:var(--rcpn-ui-muted);font-size:10.5px;line-height:1.4;}
body.rcpn-app-shell .rcpn-ui-stage-wizard__progress{display:flex;align-items:center;gap:6px;}
body.rcpn-app-shell .rcpn-ui-stage-wizard__progress span{
  display:flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border:1px solid var(--rcpn-ui-border-strong);
  border-radius:50%;
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-muted);
  font-size:10px;
  font-weight:600;
}
body.rcpn-app-shell .rcpn-ui-stage-wizard__progress span.is-current{border-color:var(--rcpn-ui-accent);background:var(--rcpn-ui-accent);color:var(--rcpn-ui-accent-text);}
body.rcpn-app-shell .rcpn-ui-stage-wizard__progress span.is-complete{border-color:var(--rcpn-ui-success-border);background:var(--rcpn-ui-success-bg);color:var(--rcpn-ui-success);}
body.rcpn-app-shell .rcpn-ui-stage-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-bottom:1px solid var(--rcpn-ui-border);}
body.rcpn-app-shell .rcpn-ui-stage-tab{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:40px;
  padding:7px 10px;
  border:0;
  border-right:1px solid var(--rcpn-ui-border);
  border-bottom:2px solid transparent;
  background:var(--rcpn-ui-surface-soft);
  color:var(--rcpn-ui-muted);
  font-size:10.5px;
  font-weight:550;
  cursor:pointer;
}
body.rcpn-app-shell .rcpn-ui-stage-tab:last-child{border-right:0;}
body.rcpn-app-shell .rcpn-ui-stage-tab > span{
  display:flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  border-radius:50%;
  background:var(--rcpn-ui-border);
  color:var(--rcpn-ui-text-soft);
  font-size:9.5px;
}
body.rcpn-app-shell .rcpn-ui-stage-tab.is-active{border-bottom-color:var(--rcpn-ui-accent);background:var(--rcpn-ui-surface);color:var(--rcpn-ui-accent-ink);}
body.rcpn-app-shell .rcpn-ui-stage-tab.is-active > span{background:var(--rcpn-ui-accent);color:var(--rcpn-ui-accent-text);}
body.rcpn-app-shell .rcpn-ui-stage-wizard__panel > .rcpn-ui-stage-section{margin:0;padding:14px;border-top:0;}
body.rcpn-app-shell .rcpn-ui-stage-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 14px;
  border-top:1px solid var(--rcpn-ui-border);
  background:var(--rcpn-ui-surface-soft);
}
body.rcpn-app-shell .rcpn-ui-stage-nav__hint{color:var(--rcpn-ui-success);font-size:10.5px;font-weight:550;}

body.rcpn-app-shell .rcpn-ui-inline-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:10px;}
body.rcpn-app-shell .rcpn-ui-inline-actions .button{margin:0;}
body.rcpn-app-shell .rcpn-ui-inline-actions .description{margin:0;color:var(--rcpn-ui-muted);font-size:10.5px;}
body.rcpn-app-shell .rcpn-ui-alert-strip--success{border-color:var(--rcpn-ui-success-border);background:var(--rcpn-ui-success-bg);}
body.rcpn-app-shell .rcpn-ui-alert-strip--danger{border-color:var(--rcpn-ui-danger-border);background:var(--rcpn-ui-danger-bg);color:var(--rcpn-ui-danger-text);}
body.rcpn-app-shell .rcpn-ui-stage-section > .rcpn-ui-alert-strip{margin-top:10px;}

body.rcpn-app-shell .rcpn-ui-metric-grid--3{grid-template-columns:repeat(3,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-metric-grid--4{grid-template-columns:repeat(4,minmax(0,1fr));}
body.rcpn-app-shell .rcpn-ui-metric small{display:block;margin-top:3px;color:var(--rcpn-ui-muted);font-size:9.5px;line-height:1.35;}
body.rcpn-app-shell .rcpn-ui-metric.is-success{border-color:var(--rcpn-ui-success-border);background:var(--rcpn-ui-success-bg);}
body.rcpn-app-shell .rcpn-ui-metric.is-warning{border-color:var(--rcpn-ui-warning-border);background:var(--rcpn-ui-warning-bg);}
body.rcpn-app-shell .rcpn-ui-metric.is-neutral{background:var(--rcpn-ui-surface-soft);}

body.rcpn-app-shell .rcpn-ui-record-list{border-top:1px solid var(--rcpn-ui-border);}
body.rcpn-app-shell .rcpn-ui-record-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  min-height:42px;
  padding:8px 0;
  border-bottom:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-record-row:last-child{border-bottom:0;}
body.rcpn-app-shell .rcpn-ui-record-row__copy{display:grid;gap:2px;min-width:0;}
body.rcpn-app-shell .rcpn-ui-record-row__copy strong{overflow:hidden;color:var(--rcpn-ui-text);font-size:11px;font-weight:500;text-overflow:ellipsis;white-space:nowrap;}
body.rcpn-app-shell .rcpn-ui-record-row__copy span{color:var(--rcpn-ui-muted);font-size:9.5px;}
body.rcpn-app-shell .rcpn-ui-record-row__actions{display:flex;align-items:center;gap:6px;}
body.rcpn-app-shell .rcpn-ui-record-row__actions .button{margin:0;}
body.rcpn-app-shell .rcpn-ui-stage-section > .rcpn-ui-field{margin-top:10px;}
body.rcpn-app-shell .rcpn-ui-stage-section input[type="file"]{width:100%;}
body.rcpn-app-shell .rcpn-ui-meta-note{display:block;margin-top:3px;color:var(--rcpn-ui-accent-ink);font-size:9.5px;font-weight:500;}

body.rcpn-app-shell .rcpn-ui-stage-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-stage-footer > div:first-child{min-width:0;}
body.rcpn-app-shell .rcpn-ui-stage-footer strong{display:block;color:var(--rcpn-ui-text);font-size:11px;font-weight:550;}
body.rcpn-app-shell .rcpn-ui-stage-footer p{margin:2px 0 0;color:var(--rcpn-ui-muted);font-size:10.5px;line-height:1.4;}
body.rcpn-app-shell .rcpn-ui-stage-footer .button{flex:0 0 auto;margin:0;}

@media(max-width:960px){
  body.rcpn-app-shell .rcpn-ui-stage-split{grid-template-columns:1fr;}
  body.rcpn-app-shell .rcpn-ui-metric-grid--4{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:780px){
  body.rcpn-app-shell .rcpn-ui-form-grid--4,
  body.rcpn-app-shell .rcpn-ui-form-grid--5,
  body.rcpn-app-shell .rcpn-ui-form-grid--6,
  body.rcpn-app-shell .rcpn-ui-checklist,
  body.rcpn-app-shell .rcpn-ui-metric-grid--3,
  body.rcpn-app-shell .rcpn-ui-metric-grid--4{grid-template-columns:1fr;}
  body.rcpn-app-shell .rcpn-ui-stage-section__head--actions,
  body.rcpn-app-shell .rcpn-ui-stage-footer,
  body.rcpn-app-shell .rcpn-ui-stage-wizard__head{align-items:stretch;flex-direction:column;}
  body.rcpn-app-shell .rcpn-ui-stage-tabs{grid-template-columns:1fr;}
  body.rcpn-app-shell .rcpn-ui-stage-tab{justify-content:flex-start;border-right:0;border-bottom:1px solid var(--rcpn-ui-border);}
  body.rcpn-app-shell .rcpn-ui-stage-tab.is-active{border-left:3px solid var(--rcpn-ui-accent);border-bottom-color:var(--rcpn-ui-border);}
  body.rcpn-app-shell .rcpn-ui-stage-footer .button{align-self:flex-start;}
}

/* Shared Case Service row treatment when the legacy picker is hosted inside the RCP shell. */
body.rcpn-app-shell .rcpn-case-service-selected{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:32px;}
body.rcpn-app-shell .rcpn-case-service-selected > span{display:grid;gap:2px;min-width:0;}
body.rcpn-app-shell .rcpn-case-service-selected .rcpn-case-service-label{color:var(--rcpn-ui-text);font-size:11px;font-weight:500;line-height:1.35;}
body.rcpn-app-shell .rcpn-case-service-selected .rcpn-case-service-price{color:var(--rcpn-ui-muted);font-size:9.5px;line-height:1.35;}
body.rcpn-app-shell .rcpn-case-service-selected .button-link{white-space:nowrap;}

/* v1.0.18.615 — shared editable summary-card treatment for shell metadata cards. */
body.rcpn-app-shell button.rcpn-ui-summary-card--editable{
  appearance:none;
  -webkit-appearance:none;
  cursor:pointer;
  transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
body.rcpn-app-shell button.rcpn-ui-summary-card--editable:hover,
body.rcpn-app-shell button.rcpn-ui-summary-card--editable:focus-visible{
  border-color:var(--rcpn-ui-border-strong);
  background:var(--rcpn-ui-surface-hover);
  box-shadow:0 1px 2px rgba(33,50,67,.05);
  outline:none;
}

/* Shared operational-alert header links and modal content. */
body.rcpn-app-shell .rcpn-ui-header-context-item{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-header-context-name{
  display:inline;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  line-height:inherit;
  text-decoration:none;
}
body.rcpn-app-shell button.rcpn-ui-header-alert-link{cursor:pointer;}
body.rcpn-app-shell button.rcpn-ui-header-alert-link:hover,
body.rcpn-app-shell button.rcpn-ui-header-alert-link:focus-visible{
  color:#fff;
  text-decoration:underline;
  text-underline-offset:2px;
  outline:0;
}
body.rcpn-app-shell .rcpn-ui-page-title .rcpn-ui-header-context-name{
  font-size:inherit;
  font-weight:inherit;
  letter-spacing:inherit;
}
body.rcpn-app-shell .rcpn-ui-header-alert-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 17px;
  width:17px;
  height:17px;
  min-width:17px;
  margin:0;
  padding:0;
  border:1px solid rgba(255,255,255,.38);
  border-radius:999px;
  background:rgba(255,255,255,.11);
  color:#fff;
  cursor:pointer;
}
body.rcpn-app-shell .rcpn-ui-header-alert-badge .dashicons{
  width:11px;
  height:11px;
  font-size:11px;
  line-height:11px;
}
body.rcpn-app-shell .rcpn-ui-header-alert-badge.is-warning{
  background:rgba(246,196,91,.22);
  border-color:rgba(246,196,91,.55);
}
body.rcpn-app-shell .rcpn-ui-header-alert-badge.is-danger{
  background:rgba(231,121,121,.24);
  border-color:rgba(238,153,153,.62);
}
body.rcpn-app-shell .rcpn-ui-header-alert-badge:hover,
body.rcpn-app-shell .rcpn-ui-header-alert-badge:focus-visible{
  background:rgba(255,255,255,.24);
  outline:0;
}
body.rcpn-app-shell .rcpn-ui-operational-alerts-content{display:grid;gap:0;}
body.rcpn-app-shell .rcpn-ui-alert-section{padding:0 0 16px;}
body.rcpn-app-shell .rcpn-ui-alert-section + .rcpn-ui-alert-section{
  padding-top:16px;
  border-top:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-alert-section:last-child{padding-bottom:0;}
body.rcpn-app-shell .rcpn-ui-alert-section__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:9px;
}
body.rcpn-app-shell .rcpn-ui-alert-section__head span{
  display:block;
  margin-bottom:2px;
  color:var(--rcpn-ui-muted);
  font-size:9.5px;
  font-weight:600;
  letter-spacing:.06em;
  text-transform:uppercase;
}
body.rcpn-app-shell .rcpn-ui-alert-section__head h3{
  margin:0;
  color:var(--rcpn-ui-text);
  font-size:14px;
  line-height:1.3;
}
body.rcpn-app-shell .rcpn-ui-alert-priority{
  flex:0 0 auto;
  padding:3px 7px;
  border:1px solid var(--rcpn-ui-warning-border);
  border-radius:999px;
  background:var(--rcpn-ui-warning-bg);
  color:var(--rcpn-ui-warning);
  font-size:10px;
  font-weight:600;
}
body.rcpn-app-shell .rcpn-ui-alert-section--client.is-high .rcpn-ui-alert-priority,
body.rcpn-app-shell .rcpn-ui-alert-section--client.is-critical .rcpn-ui-alert-priority,
body.rcpn-app-shell .rcpn-ui-alert-section--patient .rcpn-ui-alert-priority{
  border-color:var(--rcpn-ui-danger-border);
  background:#fff8f8;
  color:var(--rcpn-ui-danger-text);
}
body.rcpn-app-shell .rcpn-ui-alert-copy{
  margin:0;
  color:var(--rcpn-ui-text);
  font-size:12px;
  line-height:1.5;
}
body.rcpn-app-shell .rcpn-ui-alert-meta{
  display:block;
  margin-top:7px;
  color:var(--rcpn-ui-muted);
  font-size:10px;
}
body.rcpn-app-shell .rcpn-ui-patient-warning-stack{display:grid;gap:8px;}
body.rcpn-app-shell .rcpn-ui-patient-warning-block{
  display:grid;
  grid-template-columns:24px minmax(0,1fr);
  gap:10px;
  align-items:flex-start;
  padding:10px 12px;
  border-left:3px solid var(--rcpn-ui-danger-border);
  background:#fff9f8;
}
body.rcpn-app-shell .rcpn-ui-patient-warning-block > .dashicons{
  width:20px;
  height:20px;
  margin-top:1px;
  color:var(--rcpn-ui-danger-text);
  font-size:20px;
  line-height:20px;
}
body.rcpn-app-shell .rcpn-ui-patient-warning-label{
  display:block;
  margin-bottom:3px;
  color:var(--rcpn-ui-danger-text);
  font-size:9px;
  font-weight:700;
  letter-spacing:.065em;
  text-transform:uppercase;
}
body.rcpn-app-shell .rcpn-ui-patient-warning-block.is-behaviour strong{
  display:block;
  color:var(--rcpn-ui-text);
}
body.rcpn-app-shell .rcpn-ui-alert-allergen-list{display:grid;gap:8px;}
body.rcpn-app-shell .rcpn-ui-alert-allergen{display:grid;gap:4px;}
body.rcpn-app-shell .rcpn-ui-alert-allergen-head{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}
body.rcpn-app-shell .rcpn-ui-alert-allergen-head strong{color:var(--rcpn-ui-text);font-size:11.5px;}
body.rcpn-app-shell .rcpn-ui-alert-allergen p{margin:0;color:var(--rcpn-ui-text-soft);font-size:11px;line-height:1.45;}
body.rcpn-app-shell .rcpn-ui-allergen-severity{
  padding:2px 6px;
  border:1px solid var(--rcpn-ui-danger-border);
  border-radius:999px;
  background:#fff;
  color:var(--rcpn-ui-danger-text);
  font-size:9px;
  font-weight:600;
}

/* Shared inline lookup result surface for fields inside modals/panels. */
body.rcpn-app-shell .rcpn-ui-lookup-results{
  display:grid;
  max-height:260px;
  margin-top:6px;
  overflow:auto;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
  box-shadow:0 8px 22px rgba(15,23,42,.08);
}


/* v1.0.18.617 — shared operational worklist and archive filter primitives. */
body.rcpn-app-shell .rcpn-ui-archive-filter{
  display:flex;
  align-items:center;
  gap:6px;
  margin:0;
  color:var(--rcpn-ui-muted);
  font-size:11px;
  font-weight:450;
}
body.rcpn-app-shell .rcpn-ui-archive-filter > span{white-space:nowrap;}
body.rcpn-app-shell .rcpn-ui-archive-toolbar input[type="date"]{
  width:auto;
  min-width:142px;
  margin:0;
}
body.rcpn-app-shell .rcpn-ui-operational-list{
  display:grid;
  gap:8px;
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-operational-row{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  min-width:0;
  padding:12px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-ui-operational-row--note-column{
  grid-template-columns:auto minmax(220px,.85fr) minmax(260px,1.15fr) auto;
}
body.rcpn-app-shell .rcpn-ui-operational-main{min-width:0;}
body.rcpn-app-shell .rcpn-ui-operational-note-column{
  min-width:0;
  align-self:center;
}
body.rcpn-app-shell .rcpn-ui-operational-title-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}
body.rcpn-app-shell .rcpn-ui-operational-title-row > strong{
  color:var(--rcpn-ui-text);
  font-size:14px;
  font-weight:550;
  line-height:1.3;
}
body.rcpn-app-shell .rcpn-ui-operational-meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:0;
  margin-top:4px;
  color:var(--rcpn-ui-muted);
  font-size:11px;
  line-height:1.35;
}
body.rcpn-app-shell .rcpn-ui-operational-meta > span{display:inline-flex;align-items:center;}
body.rcpn-app-shell .rcpn-ui-operational-meta > span + span::before{
  content:"·";
  margin:0 7px;
  color:var(--rcpn-ui-border-strong);
}
body.rcpn-app-shell .rcpn-ui-operational-note{
  max-width:900px;
  margin:0;
  overflow:hidden;
  color:var(--rcpn-ui-text-soft);
  font-size:11.5px;
  line-height:1.4;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-operational-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:6px;
}
body.rcpn-app-shell .rcpn-ui-operational-actions .button{margin:0;}
@media(max-width:1100px){
  body.rcpn-app-shell .rcpn-ui-operational-row--note-column{grid-template-columns:auto minmax(0,1fr) auto;}
  body.rcpn-app-shell .rcpn-ui-operational-row--note-column .rcpn-ui-operational-note-column{grid-column:2 / 3;}
  body.rcpn-app-shell .rcpn-ui-operational-row--note-column .rcpn-ui-operational-actions{grid-column:3;grid-row:1 / span 2;}
}
@media(max-width:900px){
  body.rcpn-app-shell .rcpn-ui-operational-row{grid-template-columns:auto minmax(0,1fr);}
  body.rcpn-app-shell .rcpn-ui-operational-row--note-column{grid-template-columns:auto minmax(0,1fr);}
  body.rcpn-app-shell .rcpn-ui-operational-row--note-column .rcpn-ui-operational-note-column{grid-column:2;}
  body.rcpn-app-shell .rcpn-ui-operational-row--note-column .rcpn-ui-operational-actions,
  body.rcpn-app-shell .rcpn-ui-operational-actions{grid-column:1/-1;grid-row:auto;justify-content:flex-start;padding-left:0;}
}
@media(max-width:620px){
  body.rcpn-app-shell .rcpn-ui-operational-row,
  body.rcpn-app-shell .rcpn-ui-operational-row--note-column{grid-template-columns:1fr;}
  body.rcpn-app-shell .rcpn-ui-operational-row--note-column .rcpn-ui-operational-note-column{grid-column:auto;}
  body.rcpn-app-shell .rcpn-ui-operational-note{white-space:normal;}
  body.rcpn-app-shell .rcpn-ui-operational-actions{grid-column:auto;}
}


/* v1.0.18.638 — shared Master Case workflow pill completion. */
body.rcpn-app-shell .rcpn-workflow-pill.is-ct{
  border-color:#ead7ad;
  background:#fff8e9;
  color:#7a581b;
}

/* v1.0.18.643 — shared stage action pair and checkbox-as-field treatment. */
body.rcpn-app-shell .rcpn-ui-stage-footer__actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  flex:0 0 auto;
  width:min(340px,100%);
}
body.rcpn-app-shell .rcpn-ui-stage-footer__actions .button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:36px;
  margin:0;
  white-space:nowrap;
}
body.rcpn-app-shell .rcpn-ui-checkbox-field{
  display:grid;
  align-content:start;
  gap:5px;
  min-width:0;
}
body.rcpn-app-shell .rcpn-ui-checkbox-field__label{
  display:block;
  color:var(--rcpn-ui-text-soft);
  font-size:11px;
  font-weight:500;
  line-height:1.35;
}
body.rcpn-app-shell .rcpn-ui-checkbox-field__label em{
  color:var(--rcpn-ui-danger);
  font-style:normal;
}
body.rcpn-app-shell .rcpn-ui-checkbox-control{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:0 10px;
  box-sizing:border-box;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-text-soft);
  font-size:10.5px;
  font-weight:500;
  line-height:1.35;
  cursor:pointer;
}
body.rcpn-app-shell .rcpn-ui-checkbox-control input[type="checkbox"]{
  flex:0 0 auto;
  width:16px;
  height:16px;
  min-height:0;
  margin:0;
}
body.rcpn-app-shell .rcpn-ui-checkbox-control:has(input:checked){
  border-color:var(--rcpn-ui-success-border);
  background:var(--rcpn-ui-success-bg);
}
@media(max-width:780px){
  body.rcpn-app-shell .rcpn-ui-stage-footer__actions{
    grid-template-columns:1fr;
    width:100%;
  }
  body.rcpn-app-shell .rcpn-ui-stage-footer__actions .button{width:100%;}
}

/* Compact checkbox treatment for table/workflow rows. */
.rcpn-ui-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: 500;
    white-space: nowrap;
}
.rcpn-ui-inline-check input[type="checkbox"],
.rcpn-ui-inline-check input[type="radio"] {
    width: auto;
    min-width: 0;
    height: auto;
    margin: 0;
    flex: 0 0 auto;
}


/* v1.0.18.726 — canonical archive parity hardening.
 * Invoice archive is the visual reference for every shell-native CPT archive.
 * These selectors deliberately carry enough specificity to prevent module/edit
 * screen CSS (especially broad #title / button / input rules) leaking into a
 * list screen. Future archive pages should consume this shared layer rather
 * than add post-type-specific table/tool-bar styling. */
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table thead th#title,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table thead th.column-title,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table thead th.column-primary,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tfoot th#title,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tfoot th.column-title,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tfoot th.column-primary{
  min-height:0;
  height:auto;
  margin:0;
  padding:var(--rcpn-ui-table-head-pad-y) 10px;
  border:0;
  border-bottom:1px solid var(--rcpn-ui-table-head-border);
  border-radius:0;
  background:var(--rcpn-ui-table-head-bg);
  box-shadow:none;
  color:var(--rcpn-ui-text);
  font-family:var(--rcpn-ui-font);
  font-size:var(--rcpn-ui-table-head-size);
  font-weight:500;
  line-height:1.3;
}
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table thead th#title > a,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table thead th.column-title > a,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table thead th.column-primary > a{
  display:block;
  min-height:0;
  height:auto;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:inherit;
  font:inherit;
  line-height:inherit;
  text-decoration:none;
}

/* Toolbar controls are one component across every archive. Module-level edit
 * screen button/input rules must never change archive geometry or colour. */
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-toolbar .button,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-toolbar .button-secondary,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-search .button{
  box-sizing:border-box;
  min-height:var(--rcpn-ui-control-height);
  height:var(--rcpn-ui-control-height);
  margin:0;
  padding:0 11px;
  border:1px solid var(--rcpn-ui-border-strong);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
  color:#5d7185;
  box-shadow:none;
  font-family:var(--rcpn-ui-font);
  font-size:12.5px;
  font-weight:450;
  line-height:calc(var(--rcpn-ui-control-height) - 2px);
}
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-toolbar select,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-search input[type="search"],
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-search input[type="text"]{
  box-sizing:border-box;
  height:var(--rcpn-ui-control-height);
  min-height:var(--rcpn-ui-control-height);
  margin:0;
  border:1px solid var(--rcpn-ui-border-strong);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
  box-shadow:none;
  color:var(--rcpn-ui-text-soft);
  font-family:var(--rcpn-ui-font);
  font-size:12.5px;
  font-weight:400;
  line-height:1.2;
}

/* Legacy invoice badges and native shell status chips are the same archive
 * component visually. Renderers may use either class while migration continues. */
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table .rcpn-admin-badge,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table .rcpn-ui-status-chip,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table .rcpn-status-pill{
  display:inline-flex;
  align-items:center;
  box-sizing:border-box;
  min-height:22px;
  margin:0;
  padding:2px 8px;
  border-radius:var(--rcpn-ui-radius-pill);
  font-size:10.5px;
  font-weight:500;
  line-height:1.25;
  white-space:nowrap;
}

/* Archive cells use one typography/interaction language. The record title is
 * the only intentional row navigation target; linked metadata must not create
 * a second visual link language. */
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tbody td,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tbody th{
  font-family:var(--rcpn-ui-font);
}
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tbody td:not(.column-primary) a{
  color:inherit;
  font:inherit;
  text-decoration:none;
}

/* v1.0.18.738 — canonical archive row surface.
 * All shell-native archives use white data rows, including the primary/title
 * column. This prevents WordPress/CPT-specific striping or primary-column
 * backgrounds from leaking through on individual record types. */
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tbody tr > th,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tbody tr > td,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table tbody tr > td.column-primary{
  background:var(--rcpn-ui-surface);
}

/* Shell archives own record state in their dedicated Status columns. Legacy
 * WordPress post-state text and the old mobile title-status clones are not part
 * of the canonical archive row pattern. */
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table .post-state,
body.rcpn-app-shell.rcpn-shell-archive .rcpn-ui-archive-table .rcpn-mobile-title-status{
  display:none;
}

/* Shared shell notice surface used by operational modules. */
body.rcpn-app-shell .rcpn-ui-notice{
  padding:10px 12px;
  border:1px solid var(--rcpn-ui-border,#dbe2e8);
  border-radius:var(--rcpn-ui-radius,8px);
  background:var(--rcpn-ui-surface,#fff);
}
body.rcpn-app-shell .rcpn-ui-notice p{margin:0;}
body.rcpn-app-shell .rcpn-ui-notice.is-success{border-color:var(--rcpn-ui-success-border,#b9dec9);background:var(--rcpn-ui-success-bg,#f2fbf6);}
body.rcpn-app-shell .rcpn-ui-notice.is-danger{border-color:var(--rcpn-ui-danger-border,#efc2c2);background:var(--rcpn-ui-danger-bg,#fff5f5);}

/* v1.0.18.766 — medicine-transfer modals use the canonical application modal.
 * Legacy transfer class names remain only as behaviour hooks. */
body.rcpn-app-shell .rcpn-transfer-modal.rcpn-ui-modal{padding:24px;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-modal__panel.rcpn-ui-modal-dialog{margin:0;padding:0;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-modal-form{display:flex;flex-direction:column;min-width:0;min-height:0;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-modal-form .rcpn-ui-field{margin:0;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-modal-form .rcpn-ui-field > span:first-child{margin:0;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-modal-grid{margin:0;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-quantity-field{max-width:180px;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-modal-footer.rcpn-ui-modal-footer{margin:0;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-summary{margin:0 0 14px;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-summary strong{display:block;margin:0 0 3px;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-summary span{display:block;color:var(--rcpn-ui-muted);}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-medicine-search{position:relative;font-weight:400;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-medicine-results.rcpn-ui-lookup-results{position:absolute;z-index:3;top:100%;right:0;left:0;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-medicine-empty{padding:10px;color:var(--rcpn-ui-muted);font-size:11px;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-batch-allocation{margin:0 0 14px;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-batch-allocation h3{margin:0 0 10px;color:var(--rcpn-ui-text);font-size:13px;font-weight:550;}
body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-batch-allocation .description{margin:8px 0 0;color:var(--rcpn-ui-muted);font-size:10.5px;}
@media(max-width:720px){
  body.rcpn-app-shell .rcpn-transfer-modal.rcpn-ui-modal{padding:12px;}
  body.rcpn-app-shell .rcpn-transfer-modal .rcpn-transfer-quantity-field{max-width:none;}
}

/* RCP v1.0.18.760 — canonical dispensary task modal.
 * This is global because the same dispensing task opens from Pharmacy pages,
 * the Dashboard task hub and other shell contexts. Module CSS should not own
 * a second presentation of the same modal. */
body.rcpn-app-shell .rcpn-dispensary-modal.rcpn-ui-modal{
  padding:24px;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__overlay.rcpn-ui-modal-backdrop{
  z-index:0;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__panel.rcpn-ui-modal-dialog{
  position:relative;
  top:auto;
  left:auto;
  z-index:1;
  width:min(var(--rcpn-ui-modal-width),calc(100vw - 48px));
  max-height:calc(100vh - 48px);
  overflow:hidden;
  padding:0;
  transform:none;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__header.rcpn-ui-modal-header{
  align-items:flex-start;
  min-height:0;
  padding:var(--rcpn-ui-modal-header-padding);
  border-bottom:1px solid var(--rcpn-ui-border);
  background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__title{
  flex:1 1 auto;
  min-width:0;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__header h2,
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__panel .rcpn-dispensary-modal__header h2{
  margin:0;
  padding:0;
  border:0;
  color:var(--rcpn-ui-text);
  font-size:19px;
  font-weight:500;
  line-height:1.25;
  text-align:left;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__title p{
  margin:3px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:11.5px;
  line-height:1.4;
  text-align:left;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__header-tools.rcpn-ui-modal-header-actions{
  margin-left:auto;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__header-tools .rcpn-print-button.button{
  min-height:var(--rcpn-ui-modal-action-height);
  height:var(--rcpn-ui-modal-action-height);
  padding:0 10px;
  border:1px solid var(--rcpn-ui-border-strong);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-accent-ink);
  font-size:11.5px;
  font-weight:450;
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__header-tools .rcpn-print-button.button:hover,
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__header-tools .rcpn-print-button.button:focus{
  border-color:var(--rcpn-ui-border-strong);
  background:var(--rcpn-ui-accent-soft);
  color:var(--rcpn-ui-accent-ink);
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__close.rcpn-ui-modal-close{
  position:static;
  width:32px;
  height:32px;
  flex:0 0 32px;
  margin:0;
  border:1px solid var(--rcpn-ui-border);
  border-radius:8px;
  background:var(--rcpn-ui-surface-soft);
  color:var(--rcpn-ui-muted);
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-action-form{
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:0;
  gap:0;
  padding:0;
  overflow:hidden;
  color:var(--rcpn-ui-text-soft);
  text-align:left;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-ui-modal-content{
  min-height:0;
  padding:var(--rcpn-ui-modal-content-padding);
  overflow:auto;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__summary{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__summary-row{
  display:grid;
  gap:8px;
  min-width:0;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__summary-row--identity{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__summary-row--route{
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__summary p{
  min-width:0;
  min-height:54px;
  margin:0;
  padding:9px 10px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-text);
  font-size:12px;
  line-height:1.35;
  text-align:left;
  overflow-wrap:anywhere;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__summary p strong{
  display:block;
  margin:0 0 4px;
  color:var(--rcpn-ui-muted);
  font-size:10px;
  font-weight:500;
  line-height:1.2;
  letter-spacing:0;
  text-transform:none;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-context-value{
  display:block;
  color:var(--rcpn-ui-text);
  font-weight:600;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-dispensing-section{
  margin-top:14px;
  padding:14px 15px;
  border:1px solid var(--rcpn-ui-accent-border,var(--rcpn-ui-border-strong));
  border-radius:var(--rcpn-ui-radius);
  background:var(--rcpn-ui-accent-soft);
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-dispensing-section + .rcpn-ui-modal-section{
  margin-top:14px;
  padding-top:14px;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-dispensing-section .rcpn-dispensary-section-heading--inline{
  align-items:center;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-dispensing-section .rcpn-dispensary-section-heading h3{
  font-size:14px;
  font-weight:600;
  color:var(--rcpn-ui-text);
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-dispensing-section .rcpn-dispensary-qty-label{
  flex-basis:170px;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-ui-modal-section{
  text-align:left;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-ui-modal-section + .rcpn-ui-modal-section{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-section-heading{
  margin:0 0 9px;
  text-align:left;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-section-heading h3{
  margin:0;
  padding:0;
  color:var(--rcpn-ui-text);
  font-size:13px;
  font-weight:550;
  line-height:1.3;
  text-align:left;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-section-heading p{
  margin:2px 0 0;
  color:var(--rcpn-ui-muted);
  font-size:11px;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-section-heading--inline{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:0;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-qty-label{
  display:block !important;
  flex:0 0 170px;
  width:170px;
  max-width:170px;
  margin:0;
  color:var(--rcpn-ui-text-soft);
  text-align:left;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-action-form label > span,
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-qty-label span{
  display:block;
  margin:0 0 5px;
  color:var(--rcpn-ui-label,#536679);
  font-size:11px;
  font-weight:650;
  line-height:1.25;
  text-align:left;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-action-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-action-form select,
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-action-form textarea{
  box-sizing:border-box;
  width:100%;
  max-width:none;
  min-height:38px;
  margin:0;
  border:1px solid var(--rcpn-ui-field-border,#cbd5df);
  border-radius:var(--rcpn-ui-field-radius,7px);
  background:var(--rcpn-ui-surface);
  color:var(--rcpn-ui-text);
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-action-form input:focus,
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-action-form select:focus,
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-action-form textarea:focus{
  border-color:var(--rcpn-ui-accent);
  box-shadow:0 0 0 1px var(--rcpn-ui-accent);
  outline:0;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-batches{
  overflow:hidden;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius);
  background:var(--rcpn-ui-surface);
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-batches__empty,
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-stock-disabled{
  margin:0;
  padding:12px 13px;
  border:0;
  background:var(--rcpn-ui-surface-soft);
  color:var(--rcpn-ui-muted);
  font-size:11.5px;
  line-height:1.45;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-batch-table{
  width:100%;
  min-width:0;
  margin:0;
  border:0;
  border-collapse:collapse;
  table-layout:fixed;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-batch-table th,
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-batch-table td{
  padding:9px 10px;
  text-align:left;
  vertical-align:middle;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-batch-table th{
  border-bottom:1px solid var(--rcpn-ui-border);
  background:var(--rcpn-ui-table-head-bg);
  color:var(--rcpn-ui-text);
  font-size:var(--rcpn-ui-table-head-size);
  font-weight:500;
  letter-spacing:.015em;
  text-transform:none;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-batch-table td{
  border-bottom:1px solid var(--rcpn-ui-table-row-border);
  color:var(--rcpn-ui-text-soft);
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-batch-table tr:last-child td{
  border-bottom:0;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-stock-pill{
  border-color:var(--rcpn-ui-success-border);
  background:var(--rcpn-ui-success-bg);
  color:var(--rcpn-ui-success);
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-batches__help{
  margin:0;
  padding:9px 11px;
  border-top:1px solid var(--rcpn-ui-border);
  background:var(--rcpn-ui-surface-soft);
  color:var(--rcpn-ui-muted);
  font-size:11px;
  line-height:1.4;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-batches__help .dashicons,
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-stock-disabled .dashicons{
  color:var(--rcpn-ui-accent);
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-notes-section textarea{
  min-height:76px;
  padding:8px 10px;
  resize:vertical;
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-ui-modal-footer{
  padding:var(--rcpn-ui-modal-footer-padding);
  border-top:1px solid var(--rcpn-ui-border);
  background:var(--rcpn-ui-surface-soft);
}
body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-ui-modal-footer .rcpn-ui-button--primary{
  min-width:118px;
}
/* Surgery supply reuses the invoice dispensing modal mechanics, with only
   quantity and one Central Pharmacy batch required for handover. */
body.rcpn-app-shell .rcpn-surgery-supply-modal .rcpn-dispensary-modal__panel.rcpn-ui-modal-dialog{
  width:min(620px,calc(100vw - 48px));
}
body.rcpn-app-shell .rcpn-surgery-supply-modal__fields{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:16px;
}
body.rcpn-app-shell .rcpn-surgery-supply-modal__fields label{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
  font-size:12px;
  color:var(--rcpn-ui-text);
}
body.rcpn-app-shell .rcpn-surgery-supply-modal .rcpn-dispensary-qty-label{
  display:flex !important;
  flex:initial;
  width:100%;
  max-width:none;
}
body.rcpn-app-shell .rcpn-surgery-supply-modal__fields input,
body.rcpn-app-shell .rcpn-surgery-supply-modal__fields select{
  width:100%;
  min-width:0;
}
body.rcpn-app-shell .rcpn-surgery-supply-modal__fields .description{
  grid-column:1/-1;
  margin:0;
}
body.rcpn-app-shell .rcpn-surgery-return-receipt-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0;
}
body.rcpn-app-shell .rcpn-surgery-return-receipt-grid>div{
  padding:12px 14px;border:1px solid var(--rcpn-ui-border);border-radius:var(--rcpn-ui-radius);
  background:var(--rcpn-ui-surface-soft);
}
body.rcpn-app-shell .rcpn-surgery-return-receipt-grid span{
  display:block;font-size:11px;color:var(--rcpn-ui-muted);margin-bottom:5px;
}
body.rcpn-app-shell .rcpn-surgery-return-receipt-grid strong{
  color:var(--rcpn-ui-text);
}
@media(max-width:640px){
  body.rcpn-app-shell .rcpn-surgery-return-receipt-grid{grid-template-columns:1fr;}
}
@media (max-width:760px){
  body.rcpn-app-shell .rcpn-dispensary-modal.rcpn-ui-modal{padding:12px;}
  body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__summary-row--identity,
  body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-modal__summary-row--route{
    grid-template-columns:1fr;
  }
  body.rcpn-app-shell .rcpn-surgery-supply-modal__fields{grid-template-columns:1fr;}
  body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-section-heading--inline{
    align-items:stretch;
    flex-direction:column;
  }
  body.rcpn-app-shell .rcpn-dispensary-modal .rcpn-dispensary-qty-label{
    width:100%;
    max-width:none;
  }
}

/* v1.0.18.769 — canonical shell table-scroll wrapper.
 * Legacy admin.css gave the overflow wrapper its own card border/background;
 * shell tables own their surface, border and radius themselves. */
body.rcpn-app-shell .rcpn-admin-table-scroll{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
body.rcpn-app-shell .rcpn-admin-table-scroll > .widefat{
  margin:0;
}


/* v1.0.18.770 — shared sequential workflow / data-entry steps.
 * Pages own only their grid proportions; visual state belongs to the global shell. */
.rcpn-ui-step-flow{
  display:grid;
  gap:8px;
  align-items:stretch;
  min-width:0;
}
.rcpn-ui-step{
  min-width:0;
  padding:11px;
  border:1px solid var(--rcpn-ui-border);
  border-radius:var(--rcpn-ui-radius-sm);
  background:var(--rcpn-ui-surface);
  transition:border-color .15s ease,background .15s ease,opacity .15s ease;
}
.rcpn-ui-step.is-active{
  border-color:var(--rcpn-ui-accent-border);
  background:var(--rcpn-ui-accent-soft);
}
.rcpn-ui-step.is-complete{border-color:var(--rcpn-ui-border-strong);}
.rcpn-ui-step.is-locked{opacity:.68;}
.rcpn-ui-step__head{
  display:flex;
  align-items:center;
  gap:7px;
  margin:0 0 9px;
  color:var(--rcpn-ui-text);
  font-size:11.5px;
}
.rcpn-ui-step__number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:21px;
  height:21px;
  flex:0 0 21px;
  border-radius:50%;
  background:var(--rcpn-ui-accent-soft);
  color:var(--rcpn-ui-accent-ink);
  font-size:10px;
  font-weight:700;
}
.rcpn-ui-step.is-active .rcpn-ui-step__number{
  background:var(--rcpn-ui-accent);
  color:var(--rcpn-ui-accent-text);
}
.rcpn-ui-step-connector{
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--rcpn-ui-muted-2);
  font-size:26px;
  line-height:1;
}
@media(max-width:900px){
  .rcpn-ui-step-connector{height:14px;transform:rotate(90deg);font-size:22px;}
}

/* R22 — shared Surgery/CT episode cards and clinical note rail.
 * Geometry lives here, never in a workflow stylesheet. */
body.rcpn-app-shell .rcpn-ui-episode-stage-list{display:grid;gap:12px;min-width:0;}
body.rcpn-app-shell .rcpn-ui-episode-stage-list > details.rcpn-ui-episode-stage-card{
  border:1px solid var(--rcpn-ui-border);border-radius:var(--rcpn-ui-radius);
  background:var(--rcpn-ui-surface);box-shadow:none;overflow:hidden;
}
body.rcpn-app-shell .rcpn-ui-episode-stage-list > details.rcpn-ui-episode-stage-card > .rcpn-ui-stage-card__head{
  gap:12px;padding:12px 16px;
}
body.rcpn-app-shell .rcpn-ui-episode-stage-list > details.rcpn-ui-episode-stage-card[open] > .rcpn-ui-stage-card__head{border-bottom:1px solid var(--rcpn-ui-border);}
body.rcpn-app-shell .rcpn-ui-episode-stage-list > details.rcpn-ui-episode-stage-card[open] > .rcpn-ui-stage-card__body{padding:0;background:var(--rcpn-ui-surface);}
body.rcpn-app-shell .rcpn-ui-episode-stage-head > div{flex:1;min-width:0;}
/* .952 — canonical completed-on/by metadata next to each episode badge. */
body.rcpn-app-shell .rcpn-ui-episode-stage-status{
  display:inline-flex;align-items:center;justify-content:flex-end;gap:10px;
  margin-left:auto;flex:0 1 auto;min-width:0;
}
body.rcpn-app-shell .rcpn-ui-episode-stage-status > .rcpn-ui-status-chip{flex:0 0 auto;margin-left:0;}
body.rcpn-app-shell .rcpn-ui-episode-stage-completion{
  color:var(--rcpn-ui-muted);font-size:11px;font-weight:400;line-height:1.4;
  white-space:nowrap;min-width:0;
}
@media(max-width:900px){
  body.rcpn-app-shell .rcpn-ui-episode-stage-status{flex-direction:column-reverse;align-items:flex-end;gap:3px;}
  body.rcpn-app-shell .rcpn-ui-episode-stage-completion{white-space:normal;text-align:right;overflow-wrap:anywhere;}
}
body.rcpn-app-shell .rcpn-ui-episode-stage-head small{display:block;margin-top:2px;color:var(--rcpn-ui-muted);font-size:10.5px;}
body.rcpn-app-shell .rcpn-ui-episode-stage-marker{
  display:flex;align-items:center;justify-content:center;flex:0 0 34px;width:34px;height:34px;
  border-radius:50%;background:var(--rcpn-ui-accent);color:var(--rcpn-ui-accent-text);font-size:13px;font-weight:650;
}
body.rcpn-app-shell .rcpn-ui-episode-stage-card[data-stage-state="complete"] .rcpn-ui-episode-stage-marker{background:var(--rcpn-ui-success);}
body.rcpn-app-shell .rcpn-ui-episode-stage-layout{
  display:grid;grid-template-columns:minmax(215px,265px) minmax(0,1fr);min-width:0;background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-ui-episode-stage-main{grid-column:2;grid-row:1;min-width:0;padding:16px;}
body.rcpn-app-shell .rcpn-ui-episode-note-rail{
  grid-column:1;grid-row:1;display:flex;flex-direction:column;min-width:0;
  padding:19px 16px 16px;background:var(--rcpn-ui-table-head-bg);border-right:1px solid var(--rcpn-ui-border);
}
body.rcpn-app-shell .rcpn-ui-episode-note-rail h4{margin:0 0 14px;color:var(--rcpn-ui-text);font-size:12px;font-weight:600;}
body.rcpn-app-shell .rcpn-ui-episode-prior-notes{display:grid;gap:12px;min-width:0;}
body.rcpn-app-shell .rcpn-ui-episode-prior-note{min-width:0;padding:11px 0;border-bottom:1px solid var(--rcpn-ui-border);}
body.rcpn-app-shell .rcpn-ui-episode-prior-note strong,body.rcpn-app-shell .rcpn-ui-episode-current-note>strong{display:block;color:var(--rcpn-ui-text-soft);font-size:11px;font-weight:600;}
body.rcpn-app-shell .rcpn-ui-episode-prior-note small{color:var(--rcpn-ui-muted);font-size:10px;}
body.rcpn-app-shell .rcpn-ui-episode-prior-note p,body.rcpn-app-shell .rcpn-ui-episode-current-note p{margin:7px 0 0;line-height:1.55;color:var(--rcpn-ui-text-soft);overflow-wrap:anywhere;}
body.rcpn-app-shell .rcpn-ui-episode-current-note{margin-top:auto;padding-top:16px;min-width:0;}
body.rcpn-app-shell .rcpn-ui-episode-current-note .rcpn-ui-field{display:block;margin:0;}
body.rcpn-app-shell .rcpn-ui-episode-current-note .rcpn-ui-field>span{display:block;margin-bottom:7px;color:var(--rcpn-ui-text-soft);font-size:11px;font-weight:600;}
body.rcpn-app-shell .rcpn-ui-episode-current-note textarea{width:100%;max-width:100%;min-height:110px;resize:vertical;background:var(--rcpn-ui-surface);}
@media(max-width:780px){
 body.rcpn-app-shell .rcpn-ui-episode-stage-layout{grid-template-columns:minmax(0,1fr);}
 body.rcpn-app-shell .rcpn-ui-episode-stage-main,body.rcpn-app-shell .rcpn-ui-episode-note-rail{grid-column:1;grid-row:auto;}
 body.rcpn-app-shell .rcpn-ui-episode-note-rail{border-right:0;border-bottom:1px solid var(--rcpn-ui-border);}
}

/* .951 — Canonical Surgery/CT episode Additional Treatment line-item surface.
 * These structural rules are shared; clinical and pharmacy handlers stay
 * owned by their respective episode workflows. */
body.rcpn-app-shell .rcpn-ui-episode-extra-section{
  min-width:0;margin:0;padding:18px 20px 22px;border:0;border-top:1px solid var(--rcpn-ui-border);
  border-radius:0;background:transparent;box-shadow:none;
}
body.rcpn-app-shell .rcpn-ui-episode-extra-section .rcpn-ui-stage-section__head{margin-bottom:12px;}
body.rcpn-app-shell .rcpn-ui-episode-extra-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 12px;}
body.rcpn-app-shell .rcpn-ui-episode-extra-lines{
  border:1px solid var(--rcpn-ui-border);border-radius:7px;overflow-x:auto;
}
body.rcpn-app-shell .rcpn-ui-episode-extra-lines table{width:100%;min-width:660px;margin:0;}
body.rcpn-app-shell .rcpn-ui-episode-extra-lines th,
body.rcpn-app-shell .rcpn-ui-episode-extra-lines td{vertical-align:middle;}
body.rcpn-app-shell .rcpn-ui-episode-extra-lines td:nth-child(2){min-width:180px;}
body.rcpn-app-shell .rcpn-ui-episode-extra-lines .rcpn-ui-meta-note{display:block;}
body.rcpn-app-shell .rcpn-ui-episode-extra-lines td:nth-child(3),
body.rcpn-app-shell .rcpn-ui-episode-extra-lines td:nth-child(4),
body.rcpn-app-shell .rcpn-ui-episode-extra-lines td:nth-child(5){white-space:nowrap;}
body.rcpn-app-shell .rcpn-ui-episode-extra-type{
  display:inline-block;padding:3px 8px;border:1px solid var(--rcpn-ui-border);border-radius:999px;
  font-size:11px;color:var(--rcpn-ui-text-soft);background:var(--rcpn-ui-surface);
}
body.rcpn-app-shell .rcpn-ui-episode-extra-empty{color:var(--rcpn-ui-muted);}
/* CT adds this surface inside the main column, so don't double its side inset. */
body.rcpn-app-shell.rcpn-shell-ct-case .rcpn-ui-episode-stage-main > .rcpn-ui-episode-extra-section{
  margin-top:16px;padding:16px 0 0;
}
body.rcpn-app-shell .rcpn-ct-extra-row .rcpn-case-service-selected{display:flex;align-items:center;justify-content:space-between;gap:8px;}
body.rcpn-app-shell .rcpn-ct-extra-row .rcpn-ct-extra-note{margin-top:6px;min-width:175px;}
body.rcpn-app-shell .rcpn-ct-extra-row .rcpn-ct-extra-qty{width:82px;max-width:100%;}
body.rcpn-app-shell .rcpn-ct-extra-row .rcpn-ct-extra-total{font-variant-numeric:tabular-nums;}
