.pf-center { background:#f5f9f9; border:1px solid #d5e6e3; border-radius:18px; margin:20px 0; padding:22px; }
.content[data-workspace="reward-operations"] #reward-operations { display:block; margin-top:0; }
.pf-workspace-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.pf-workspace-actions a { text-decoration:none; text-align:center; }
.reward-operations-workbench .pf-center { margin:0; }
.reward-operations-nav { display:flex; gap:8px; margin-bottom:14px; padding:4px; overflow-x:auto; border:1px solid #d5e6e3; border-radius:14px; background:#f5f9f9; scrollbar-width:thin; }
.reward-operations-nav button { flex:0 0 auto; min-height:42px; padding:9px 15px; border:0; border-radius:10px; background:transparent; color:#315c62; font:inherit; font-weight:700; white-space:nowrap; cursor:pointer; }
.reward-operations-nav button[aria-selected="true"] { background:#0c586c; color:#fff; box-shadow:0 2px 8px rgba(7,68,82,.16); }
.reward-operations-nav button:focus-visible { outline:3px solid #26b994; outline-offset:2px; }
.reward-operations-tabpanel[hidden] { display:none !important; }
.reward-operations-tabpanel > .referral-card { margin:0; }
.reward-operations-tabpanel > .pf-records { margin:0; }
@media (max-width:600px) {
  .content[data-workspace="reward-operations"] #reward-operations.mobile-workbench-active { display:flex; }
  .reward-operations-nav { gap:5px; margin:0; padding:3px; border-radius:11px; }
  .reward-operations-nav button { min-height:38px; padding:7px 12px; font-size:.88rem; }
  .reward-operations-workbench .mobile-workbench-scroll { padding-top:4px; }
}
.pf-center [hidden], .pf-dialog [hidden] { display:none !important; }
.pf-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.pf-heading h3,.pf-heading h4 { margin:0; }
.pf-heading p { color:#53706d; margin:6px 0 0; }
.pf-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:18px; }
.pf-tabs button { border:1px solid #bdd7d2; background:#fff; color:#244e47; border-radius:10px; padding:12px 8px; font-weight:650; cursor:pointer; }
.pf-tabs button[aria-selected="true"] { color:white; background:#1f6c5b; border-color:#1f6c5b; }
.pf-layout { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(220px,1fr); gap:18px; align-items:start; }
.pf-panel { min-width:0; padding:18px; border:1px solid #dce7e4; border-radius:14px; background:#fff; }
.pf-panel h4 { margin:0 0 15px; }
.pf-panel form,.pf-panel label,.pf-dialog label { display:grid; gap:7px; }
.pf-panel form { gap:14px; }
.pf-panel label,.pf-dialog label { font-size:13px; color:#254840; font-weight:600; }
.pf-panel input,.pf-panel select,.pf-panel textarea,.pf-dialog input { width:100%; min-width:0; border:1px solid #c8d8d4; border-radius:8px; padding:10px 11px; background:#fff; color:#163f35; font:inherit; box-sizing:border-box; }
.pf-panel input:disabled { background:#eef3f1; }
.pf-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.pf-note { margin:5px 0; color:#5d716b; font-size:12px; line-height:1.7; }
.pf-search { display:grid; gap:7px; position:relative; }
.pf-search small { font-size:12px; color:#59716b; }
.pf-results { background:#fff; border:1px solid #a6c7bf; border-radius:9px; max-height:220px; overflow:auto; padding:5px; }
.pf-results button { display:block; width:100%; text-align:left; border:0; background:#fff; padding:10px; cursor:pointer; }
.pf-results button:hover,.pf-results button:focus { background:#eaf5ef; }
.pf-results small { display:block; }
.pf-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.pf-actions [role="status"],#pf-action-status { color:#945020; font-size:13px; }
.pf-irreversible-warning { margin:14px 0; padding:12px 14px; border:1px solid #e7b6a7; border-radius:10px; color:#8d3427; background:#fff4f0; font-size:13px; line-height:1.6; }
.pf-final-action { border-color:#a3392f; background:#a3392f; }
.pf-final-action:hover,.pf-final-action:focus-visible { border-color:#812c24; background:#812c24; }
.pf-metrics { display:grid; gap:0; margin:0; }
.pf-metrics>div { display:flex; align-items:baseline; justify-content:space-between; gap:8px; border-bottom:1px solid #e5eeea; padding:10px 0; }
.pf-metrics dt { font-size:12px; color:#5c736b; }
.pf-metrics dd { margin:0; font-weight:700; color:#173d32; font-size:17px; font-variant-numeric:tabular-nums; }
.pf-metrics dd small { font-size:10px; font-weight:400; }
.pf-metrics .pf-available dd { color:#127350; }
.pf-metrics .pf-debt dd { color:#b23933; }
.pf-records { margin-top:20px; padding:18px; border:1px solid #dce7e4; border-radius:14px; background:#fff; }
.pf-export-tools { display:flex; align-items:end; flex-wrap:wrap; gap:10px; margin:12px 0; }
.pf-export-tools label { display:grid; gap:5px; color:#607b82; font-size:.9rem; }
.pf-custom-date-range:not([hidden]) { display:flex; align-items:end; flex-wrap:wrap; gap:10px; }
.pf-records #pf-record-total { display:inline-flex; margin:0 0 10px; padding:7px 11px; border-radius:9px; color:#075e67; background:#e8f5f1; font-weight:800; }
.pf-record-summary { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px 14px; margin:10px 0 12px; }
.pf-records .pf-record-summary #pf-record-total { max-width:100%; margin:0; padding:6px 10px; font-size:14px; line-height:1.35; font-weight:700; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.pf-records .pf-record-summary #pf-record-status { min-width:0; margin:0; color:#607b82; font-size:12px; line-height:1.45; overflow-wrap:anywhere; }
.pf-export-tools input,.pf-export-tools select { min-height:40px; padding:7px 10px; border:1px solid #d4e5e8; border-radius:10px; color:#113b48; background:#fff; }
.pf-records td small { display:block; color:#687f76; margin-top:4px; }
.pf-records th,.pf-records td { white-space:nowrap; padding:12px; }
.pess-direct-referral-list { display:grid; gap:6px; margin:0; padding:0; list-style:none; }
.pess-direct-referral-list li { display:grid; justify-items:start; gap:2px; }
.pess-direct-referral-list small { color:#607b82; font-size:11px; white-space:normal; }
.pess-table-tools { display:flex; align-items:end; flex-wrap:wrap; gap:8px; margin:10px 0 12px; }
.pess-table-search,.pess-table-filter { display:grid; gap:4px; min-width:min(240px,100%); color:#607b82; font-size:11px; font-weight:650; }
.pess-table-search { flex:1 1 260px; }
.pess-table-filter { flex:0 1 180px; }
.pess-table-tools input,.pess-table-tools select { min-width:0; min-height:36px; padding:7px 10px; border:1px solid #d4e5e8; border-radius:9px; color:#113b48; background:#fff; font:inherit; }
.pess-table-tools-status { flex:1 1 100%; min-height:1em; color:#607b82; font-size:11px; line-height:1.4; }
.pess-table-tools + .table-wrap td button small,.member-account-list-scroll td button small { display:block; margin-top:3px; color:#607b82; font-size:10px; font-weight:500; }
.pess-network-tree-dialog { width:min(900px,calc(100vw - 28px)); max-width:none; max-height:calc(100vh - 28px); overflow:auto; }
.pess-network-tree-content { overflow:auto; padding:4px 2px 8px; }
.pess-network-tree-root { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid #a8d7ca; border-radius:12px; background:#eef9f5; font-weight:700; }
.pess-network-tree-content ul { margin:8px 0 0 17px; padding:0 0 0 17px; border-left:1px solid #bfd9d3; list-style:none; }
.pess-network-tree-content li { position:relative; padding:5px 0 3px 3px; }
.pess-network-tree-content li::before { position:absolute; top:21px; left:-17px; width:14px; border-top:1px solid #bfd9d3; content:""; }
.pess-network-tree-content details > summary { display:flex; align-items:center; flex-wrap:wrap; gap:6px 9px; cursor:pointer; list-style:none; }
.pess-network-tree-content details > summary::-webkit-details-marker { display:none; }
.pess-network-tree-content details > summary::before { width:8px; color:#6a8b82; content:"›"; font-size:16px; }
.pess-network-tree-content details[open] > summary::before { content:"⌄"; }
.pess-network-tree-content details > summary span { color:#607b82; font-size:11px; }
.pess-network-tree-content .small-button { min-height:30px; padding:5px 9px; font-size:12px; }
.pf-status { display:inline-block; padding:4px 7px; border-radius:6px; background:#eef1f2; font-size:12px; }
.pf-pending { background:#fff2d5; color:#93651f; }.pf-completed { background:#e4f5eb; color:#246843; }.pf-reversed { background:#fde9e5; color:#9e4034; }
.pf-dialog { width:min(620px,calc(100vw - 32px)); max-height:85vh; border:1px solid #afc9c0; border-radius:16px; padding:22px; color:#183b30; background:#fff; box-sizing:border-box; }
.pf-dialog::backdrop { background:rgba(10,28,24,.45); }
.pf-detail { display:grid; gap:10px; }.pf-detail>div { display:grid; grid-template-columns:90px minmax(0,1fr); gap:10px; }.pf-detail dt { color:#678073; font-size:13px; }.pf-detail dd { margin:0; overflow-wrap:anywhere; }
.pf-history { color:#617368; font-size:11px; border-top:1px solid #e2ece6; padding-top:8px; }
.pf-member-card .pf-heading { align-items:center; margin-bottom:5px; }.pf-member-card h3 { font-size:16px; }.pf-member-card .pf-metrics dd { font-size:15px; }.pf-member-card .pf-metrics>div { padding:8px 0; }
.pf-member-card details { margin-top:12px; font-size:12px; }.pf-member-card details p { line-height:1.5; padding:4px 0; }.pf-member-card details strong { margin-left:5px; }.pf-member-card details small { display:block; color:#6c7d74; }.pf-manage { margin-top:14px; width:100%; }
.pf-center :focus-visible,.pf-dialog :focus-visible { outline:3px solid #60b0a0; outline-offset:2px; }
@media (max-width:900px) { .pf-layout { grid-template-columns:1fr; }.pf-center { padding:15px; } }
@media (max-width:520px) { .pf-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }.pf-field-grid { grid-template-columns:1fr; }.pf-panel,.pf-records { padding:12px; }.pf-heading { flex-wrap:wrap; }.pf-record-summary { align-items:flex-start; flex-direction:column; gap:6px; }.pf-records .pf-record-summary #pf-record-total { font-size:12px; padding:6px 9px; }.pf-records .pf-record-summary #pf-record-status { font-size:11px; }.pess-network-tree-dialog { padding:16px; }.pess-network-tree-content ul { margin-left:8px; padding-left:10px; }.pess-network-tree-content li::before { left:-10px; width:8px; }.pess-table-tools { align-items:stretch; }.pess-table-search,.pess-table-filter { flex:1 1 100%; min-width:0; }.pess-table-tools > button { flex:1 1 100%; } }

/* Compact typography for the reward-operations workspace. */
.content[data-workspace="reward-operations"] #reward-operations-title,
.content[data-workspace="reward-operations"] .reward-operations-heading > div:nth-of-type(1) > p.muted:nth-of-type(2) {
  display: none !important;
}

.content[data-workspace="reward-operations"] #pess-finance-center {
  font-size: .9rem;
}

.content[data-workspace="reward-operations"] #pess-finance-center .pf-heading h3 {
  font-size: 1.1rem;
  line-height: 1.25;
}

.content[data-workspace="reward-operations"] #pess-finance-center .pf-heading p {
  font-size: .88rem;
  line-height: 1.45;
}

.content[data-workspace="reward-operations"] #pess-finance-center .pf-heading .eyebrow {
  font-size: .7rem;
}

.content[data-workspace="reward-operations"] #pess-finance-center .pf-tabs button,
.content[data-workspace="reward-operations"] #pess-finance-center .pf-panel h4 {
  font-size: .88rem;
}

.content[data-workspace="reward-operations"] #pess-relation-form {
  font-size: .9rem;
}

.content[data-workspace="reward-operations"] #pess-relation-form > div:first-child h3 {
  font-size: 1.1rem;
  line-height: 1.25;
}

.content[data-workspace="reward-operations"] #pess-relation-form .eyebrow,
.content[data-workspace="reward-operations"] #pess-relation-form label,
.content[data-workspace="reward-operations"] #pess-relation-form .pess-lead-search-status,
.content[data-workspace="reward-operations"] #pess-relation-form .referral-safety-note,
.content[data-workspace="reward-operations"] #pess-relation-form #pess-migration-status {
  font-size: .78rem;
}

.content[data-workspace="reward-operations"] #pess-relation-form input,
.content[data-workspace="reward-operations"] #pess-relation-form select,
.content[data-workspace="reward-operations"] #pess-relation-form textarea {
  font-size: .9rem;
}

.content[data-workspace="reward-operations"] #pess-relation-form .form-actions button {
  font-size: .82rem;
}

.content[data-workspace="reward-operations"] .reward-operations-tabpanel .referral-table-heading h3 {
  font-size: 1.05rem;
  line-height: 1.25;
}

.content[data-workspace="reward-operations"] .reward-operations-tabpanel .referral-table-heading span {
  font-size: .76rem;
}

.content[data-workspace="reward-operations"] .reward-operations-tabpanel .referral-card table {
  font-size: .82rem;
}

.content[data-workspace="reward-operations"] .reward-operations-tabpanel .referral-card th {
  font-size: .75rem;
  padding: 9px 8px;
}

.content[data-workspace="reward-operations"] .reward-operations-tabpanel .referral-card td {
  font-size: .82rem;
  padding: 9px 8px;
}

/* Further reduce the marked navigation and business-type controls. */
.content[data-workspace="reward-operations"] .reward-operations-nav button {
  font-size: .82rem;
}

.content[data-workspace="reward-operations"] #pess-finance-center .pf-tabs button {
  font-size: .78rem;
}

.content[data-workspace="reward-operations"] #pess-finance-center .pf-heading > div > p:nth-of-type(2) {
  margin: 5px 0 0;
  color: #718680;
  font-size: .72rem;
  line-height: 1.45;
}

.content[data-workspace="reward-operations"] #reward-panel-ledger .referral-table-heading h3 {
  font-size: .9rem;
}

.content[data-workspace="reward-operations"] #reward-panel-accounts .referral-table-heading h3 {
  font-size: .9rem;
}

.content[data-workspace="reward-operations"] #reward-tab-records,
.content[data-workspace="reward-operations"] #reward-tab-relations {
  font-size: .72rem;
}

/* Compact the network and bonus summary cards in Reward Management. */
#referrals .referral-metric-grid article > small {
  font-size: .78rem;
}

#referrals .referral-metric-grid article > strong {
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  line-height: 1.15;
}

#referrals .referral-metric-grid article > span {
  font-size: .82rem;
  line-height: 1.4;
}

/* Tighten typography inside the marked bonus form panel. */
.content[data-workspace="reward-operations"] #pess-finance-center #pf-form-panel {
  font-size: .84rem;
}

.content[data-workspace="reward-operations"] #pess-finance-center #pf-form-panel label {
  font-size: .78rem;
}

.content[data-workspace="reward-operations"] #pess-finance-center #pf-form-panel input,
.content[data-workspace="reward-operations"] #pess-finance-center #pf-form-panel select,
.content[data-workspace="reward-operations"] #pess-finance-center #pf-form-panel textarea {
  font-size: .84rem;
}

.content[data-workspace="reward-operations"] #pess-finance-center #pf-form-panel small,
.content[data-workspace="reward-operations"] #pess-finance-center #pf-form-panel .pf-note {
  font-size: .72rem;
  line-height: 1.4;
}

.content[data-workspace="reward-operations"] #pess-finance-center #pf-form-panel .pf-actions button {
  font-size: .8rem;
}

/* Further compact the marked 3x3 referral binding form. */
.content[data-workspace="reward-operations"] #pess-relation-form {
  font-size: .82rem;
}

.content[data-workspace="reward-operations"] #pess-relation-form > div:first-child h3 {
  font-size: .98rem;
}

.content[data-workspace="reward-operations"] #pess-relation-form .eyebrow {
  font-size: .68rem;
}

.content[data-workspace="reward-operations"] #pess-relation-form label {
  font-size: .74rem;
}

.content[data-workspace="reward-operations"] #pess-relation-form .pess-lead-search-status,
.content[data-workspace="reward-operations"] #pess-relation-form .referral-safety-note,
.content[data-workspace="reward-operations"] #pess-relation-form #pess-migration-status {
  font-size: .7rem;
}

.content[data-workspace="reward-operations"] #pess-relation-form input,
.content[data-workspace="reward-operations"] #pess-relation-form select,
.content[data-workspace="reward-operations"] #pess-relation-form textarea {
  font-size: .8rem;
}

.content[data-workspace="reward-operations"] #pess-relation-form .form-actions button,
.content[data-workspace="reward-operations"] #pess-relation-form > button[type="submit"] {
  font-size: .76rem;
}

/* Keep the mobile reward workbench in its own stable page-flow boundary.
   The shared mobile split-panel reset removes the normal panel border, while
   display:contents on the workbench wrappers can otherwise make the tab bar
   and content participate as sideways flex items. */
@media (max-width: 600px) {
  .content[data-workspace="reward-operations"] #reward-operations.mobile-split-panel.mobile-workbench-active {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    margin: 0;
    box-sizing: border-box;
    overflow-x: clip;
    resize: none;
    transform: none;
    translate: none;
    scale: none;
    border: 1px solid #d5e6e3;
    border-radius: 16px;
    box-shadow: none;
  }

  .content[data-workspace="reward-operations"] #reward-operations .mobile-workbench-fixed {
    position: sticky;
    inset-block-start: 0;
    z-index: 5;
    display: block;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .content[data-workspace="reward-operations"] #reward-operations .mobile-workbench-scroll {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
  }

  .content[data-workspace="reward-operations"] #reward-operations .reward-operations-tabpanel,
  .content[data-workspace="reward-operations"] #reward-operations .reward-operations-nav {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
}
