/* ============================================================================
   surethrift-ui.css — shared admin UI stylesheet
   Load AFTER style-no-table.css / style-moderate.css / navi.css.
   Pages define nothing that lives here; pages only override.

   COLOUR TIERS
     BLUE   #3b82f6  query the view      (search, filter, Go — safe, repeatable)
     BLACK  #1f2937  commit an action    (Save, Charge, Close account, Run payroll)
     GREEN  #47B881  create / success    (add buttons, toasts, positive figures)
     TEAL   #0d9488  data-out            (money read back to the user)
     RED    #b91c1c  error / debt
   ========================================================================== */

:root{
  --st-green:#47B881;
  --st-green-hover:#399C6C;
  --st-blue:#3b82f6;
  --st-blue-hover:#2563eb;
  --st-black:#1f2937;
  --st-black-hover:#111827;
  --st-teal:#0d9488;
  --st-red:#b91c1c;
  --st-line:#E0E0E0;
  --st-line-soft:#eeeeee;
  --st-ink:#111827;
  --st-muted:#6b7280;
  --st-faint:#9ca3af;
  --st-radius:8px;
}

/* --- legacy antagonists ---------------------------------------------------
   style-moderate.css / style-no-table.css put margin on forms inside #main,
   which pushes any card that sits inside a <form> in from the page edge.     */
#main form{margin:0 !important;padding:0 !important}

/* ==========================================================================
   PAGE WRAPPER
   Put class="st-main" on #main and class="st-page" on the content wrapper.
   st-main kills the legacy #main padding so cards sit flush with the side menu.
   ========================================================================== */
#main.st-main{padding:0 !important;margin:0 !important}
.st-page{font-family:sans-serif;color:var(--st-ink);padding:0 10px 20px 0}
.st-page *{box-sizing:border-box}

/* PHP message strip. Only render this div when the include actually returns
   text — an empty one still takes a line box and pushes the first card down. */
.st-msg{color:#663300;font-size:12px;margin:0 0 8px 0}

/* ==========================================================================
   CARDS
   ========================================================================== */
.st-card{background:#fff;border:1px solid var(--st-line);border-radius:var(--st-radius);margin-bottom:10px}
.st-card.st-headerbar{margin-bottom:16px}
/* standard height for a top card that holds only a title (same as Business Settings) */
.st-page .st-headerbar{min-height:43px}
/* clip children to the rounded corners (table cards with a footer band).
   Don't use on a card that holds a kebab panel — it would cut the panel off. */
.st-card.st-clip{overflow:hidden}

/* compact header bar: page caption + inline spinner + optional right controls */
.st-headerbar{display:flex;align-items:center;gap:10px;padding:12px 16px;position:relative}
.st-caption{font-size:13px;font-weight:500;color:var(--st-ink);letter-spacing:.3px;
  font-family:-apple-system, "system-ui", "Segoe UI", Roboto, sans-serif}
.st-headerbar-right{margin-left:auto;display:flex;align-items:center;gap:10px}

/* filter controls inside a header bar (search box, From / To dates, Go) */
.st-page .st-filters{display:flex;align-items:center;gap:10px}
.st-page .st-filters input[type="text"]:not(.choices__input){width:110px !important}
.st-page .st-filters .st-btn{padding:0 14px !important}

/* spinner slot for the header-bar loader (show/hide with style.visibility).
   The slot is always reserved, so the controls never shift. */
.st-loading-slot{flex:0 0 20px;width:20px;height:20px;margin-top:-3px;margin-bottom:-3px;display:flex;align-items:center;justify-content:center;visibility:hidden}

/* titled section head inside a card */
.st-cardhead{padding:10px 16px;border-bottom:1px solid var(--st-line);display:flex;justify-content:space-between;align-items:center}
.st-cardtitle{font-size:13px;font-weight:500;color:var(--st-ink);letter-spacing:.3px;
  font-family:-apple-system, "system-ui", "Segoe UI", Roboto, sans-serif}

.st-body{padding:4px 16px 12px}
.st-divider{height:1px;background:var(--st-line)}

/* bottom action strip of a card */
.st-actionbar{border-top:1px solid var(--st-line);padding:11px 16px;display:flex;justify-content:flex-end;align-items:center;gap:12px}
.st-hint{font-size:11px;color:var(--st-faint)}

/* ==========================================================================
   TAB STRIP
   Filter tabs attached to the top of the card that follows it.
   <div class="st-tabbar">
     <span class="st-tab st-on">All<span class="st-count">20</span></span>
     <span class="st-chip">…</span>
   </div>
   <div class="st-card st-clip">…table…</div>
   ========================================================================== */
.st-tabbar{display:flex;align-items:center;gap:18px;height:38px;padding:0 16px;background:#fff;
  border:1px solid var(--st-line);border-bottom-color:var(--st-line-soft);border-radius:var(--st-radius) var(--st-radius) 0 0;
  font-family:-apple-system, "system-ui", "Segoe UI", Roboto, sans-serif}
.st-tabbar + .st-card{border-top:none;border-top-left-radius:0;border-top-right-radius:0}
.st-tab{display:flex;align-items:center;gap:6px;height:100%;padding-top:2px;font-size:12px;color:var(--st-muted);
  border-bottom:2px solid transparent;cursor:pointer;user-select:none;white-space:nowrap}
.st-tab:hover{color:var(--st-ink)}
.st-tab.st-on{color:var(--st-green);border-bottom-color:var(--st-green)}

/* count badge inside a tab */
.st-count{font-family:sans-serif;font-size:10px;min-width:18px;height:16px;padding:0 5px;border-radius:8px;
  background:#f1f1f1;color:var(--st-muted);display:inline-flex;align-items:center;justify-content:center;font-variant-numeric:tabular-nums}
.st-count.st-zero{color:#c4c4c4}
.st-tab.st-on .st-count{background:#E1F5EE;color:#0F6E56}

/* summary chip — right end of a tab strip or header bar */
.st-chip{margin-left:auto;font-family:sans-serif;font-size:11px;color:var(--st-muted);background:#f7f7f7;border-radius:9px;
  padding:2px 9px;white-space:nowrap;cursor:default}
.st-chip b{font-weight:500;color:var(--st-ink)}
.st-chip .st-late{color:#b45309}

/* ==========================================================================
   PILLS AND DOTS
   Pale tint + darker same-hue text. Pills never wrap or truncate.
   ========================================================================== */
.st-pill{display:inline-block;padding:1px 7px;border-radius:9px;font-size:9px;letter-spacing:.2px;line-height:1.5;white-space:nowrap}
.st-pill-coral{background:#FAECE7;color:#993C1D}
.st-pill-amber{background:#FAEEDA;color:#854F0B}
.st-pill-mint{background:#E1F5EE;color:#0F6E56}
.st-pill-blue{background:#e8f4fd;color:#1976d2}
.st-pill-grey{background:#f1f1f1;color:var(--st-muted)}

.st-dot{display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0;vertical-align:middle}
.st-dot-coral{background:#D85A30}
.st-dot-amber{background:#EF9F27}
.st-dot-mint{background:#1D9E75}
.st-page .st-table td.st-num:not(:last-child),.st-page .st-table th.st-num:not(:last-child){padding-right:28px !important}
.st-dot-blue{background:#378ADD}

/* ==========================================================================
   FORM FIELDS
   ========================================================================== */
.st-formrow{display:flex;gap:16px;align-items:flex-end;flex-wrap:wrap;padding:14px 16px}
.st-field{display:flex;flex-direction:column}
.st-label{font-size:12px;color:var(--st-muted);line-height:16px;margin-bottom:5px}
.st-label,#main .st-label{font-weight:400 !important}

.st-page input[type="text"],
.st-page input[type="number"],
.st-page input[type="password"],
.st-page select{
  height:30px !important;min-height:30px !important;max-height:30px !important;
  border:1px solid #d9d9d9 !important;border-radius:6px !important;
  padding:0 10px !important;line-height:28px !important;
  font-size:12px !important;font-family:sans-serif !important;
  background:#fff !important;color:var(--st-ink) !important;
  box-shadow:none !important;text-shadow:none !important;margin:0 !important;
  box-sizing:border-box !important;vertical-align:middle !important
}
.st-page textarea{border:1px solid #d9d9d9 !important;border-radius:6px !important;padding:6px 10px;font-size:12px !important;line-height:1.5;font-family:sans-serif !important;background:#fff !important;color:var(--st-ink) !important;box-shadow:none !important;text-shadow:none !important}

/* focus token */
.st-page input[type="text"]:focus,
.st-page input[type="number"]:focus,
.st-page input[type="password"]:focus,
.st-page select:focus,
.st-page textarea:focus,
.st-page input.flatpickr-input:focus,
.st-page input.flatpickr-input.active{outline:none !important;border-color:var(--st-blue) !important;box-shadow:0 0 0 3px rgba(59,130,246,.15) !important}

/* read-back field (populated by AJAX, not typed into) */
.st-page input.st-readback{background:#fafafa !important;border-color:#ececec;font-weight:500}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.st-page .st-btn,
.st-page input.st-btn,
.st-page button.st-btn{
  height:30px !important;min-height:30px !important;max-height:30px !important;
  padding:0 18px !important;border:none !important;border-radius:6px !important;
  font-size:12px !important;font-family:sans-serif !important;font-weight:normal !important;
  line-height:30px !important;text-align:center !important;white-space:nowrap !important;
  cursor:pointer;width:auto !important;box-shadow:none !important;margin:0 !important;
  text-shadow:none !important;text-decoration:none !important;
  display:inline-block !important;box-sizing:border-box !important;
  -webkit-appearance:none;appearance:none;overflow:visible
}
.st-page .st-btn-commit{background:var(--st-black);color:#fff}
.st-page .st-btn-commit:hover{background:var(--st-black-hover);color:#fff}
.st-page .st-btn-query{background:var(--st-blue);color:#fff}
.st-page .st-btn-query:hover{background:var(--st-blue-hover);color:#fff}
.st-page .st-btn-create{background:var(--st-green);color:#fff}
.st-page .st-btn-create:hover{background:var(--st-green-hover);color:#fff}
.st-page .st-btn:disabled,
.st-page .st-btn[disabled]{cursor:not-allowed;opacity:.5}

/* ==========================================================================
   INLINE SPINNER (header-bar loader)
   ========================================================================== */
.st-spinner{display:block;width:16px;height:16px;border:2px solid #e5e7eb;border-top-color:var(--st-blue);border-radius:50%;animation:st-spin .6s linear infinite}
@keyframes st-spin{to{transform:rotate(360deg)}}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.st-empty{padding:34px 16px;text-align:center}
.st-empty svg{width:40px !important;height:40px !important;opacity:1 !important;stroke:#d1d5db !important;fill:none !important;stroke-width:1.5;margin-bottom:10px}
.st-empty-title{font-size:13px;font-weight:500;color:var(--st-ink)}
.st-empty-hint{font-size:12px;color:var(--st-faint);margin-top:4px}
/* one-line variant, no icon */
.st-empty-plain{padding:26px 16px;text-align:center;color:var(--st-faint);font-size:12px}

/* ==========================================================================
   TABLE TOKENS
   ========================================================================== */
.st-page table.st-table{width:100%;border-collapse:collapse;font-family:sans-serif}
.st-page .st-table th{font-size:9px;text-transform:uppercase;letter-spacing:.3px;color:var(--st-muted);font-weight:500;text-align:left;padding:8px 10px;border-bottom:1px solid var(--st-line)}
.st-page .st-table td{font-size:12px;padding:7px 10px;border-bottom:1px solid var(--st-line-soft);font-variant-numeric:tabular-nums}
/* rows are plain white; !important so the legacy style sheets can't stripe them */
.st-page .st-table tbody td{background:#fff !important}
.st-page .st-table tbody tr:hover td{background:#f0f0f0 !important}
/* zebra stripes — transaction / ledger tables only (reconciliation, statements) */
.st-page .st-table.st-zebra tbody tr:nth-child(even) td{background:#f7f7f7 !important}
.st-page .st-table.st-zebra tbody tr:hover td{background:#f0f0f0 !important}
.st-num{text-align:right;font-variant-numeric:tabular-nums}
.st-page .st-table th.st-num{text-align:right}
.st-money-out{color:var(--st-teal)}
.st-money-debt{color:var(--st-red)}
.st-table-footer{position:sticky;bottom:0;z-index:4;height:25px;background:#f9fafb;margin-top:-25px}

/* table modifiers */
.st-page .st-table.st-fixed{table-layout:fixed}                     /* column widths from <col style="width:…"> */
.st-page .st-table.st-fixed td{white-space:nowrap}
.st-page .st-table td.st-ellipsis{overflow:hidden;text-overflow:ellipsis}

.st-page .st-table.st-sticky thead th{position:sticky;top:0;z-index:2;background:#fff;border-bottom:none;box-shadow:inset 0 -1px 0 var(--st-line)}
.st-page .st-table tr.st-clickable{cursor:pointer}
.st-page .st-table tr.st-muted td,
.st-page .st-table td.st-faint{color:var(--st-faint)}

/* scrolling table area; set max-height on the element.
   st-footer-gap goes on the content above .st-table-footer so the band
   underlaps whitespace instead of the last row */
.st-scroll{overflow-y:auto;overflow-x:hidden}
.st-footer-gap{padding-bottom:25px}

/* row action link (Process ›  /  View) */
.st-page a.st-rowlink{display:inline-flex;align-items:center;gap:2px;font-size:11px;color:var(--st-ink);text-decoration:none;font-weight:normal}
.st-page a.st-rowlink svg{width:12px;height:12px;stroke:currentColor !important;fill:none !important}
.st-page a.st-rowlink.st-rowlink-muted{color:var(--st-faint)}

/* ==========================================================================
   TOAST  —  armPfToast(msg, 'success' | 'error' | 'neutral' | 'dataout')
   dataout = copied to clipboard only, teal with a copy glyph
   a finished download (receipt, PDF) is a success: green with the tick
   ========================================================================== */
/* Choices.js search box — borderless, single hairline, blue on focus.
   Never let it inherit the field border; it sits inside the dropdown panel. */
.choices[data-type*=select-one] .choices__input{
  width:calc(100% - 28px) !important;height:auto !important;
  margin:4px 14px 6px !important;padding:6px 4px !important;
  font-size:12px !important;font-family:sans-serif !important;color:#000 !important;
  background:transparent !important;border:none !important;
  border-bottom:1px solid #ddd !important;border-radius:0 !important;
  box-shadow:none !important;outline:none !important;
}
.choices[data-type*=select-one] .choices__input:focus{
  border:none !important;border-bottom:1px solid var(--st-blue) !important;
  box-shadow:none !important;outline:none !important;
}
/* Dropdown panel: no visible scrollbar, grey hover (not green) */
.choices__list--dropdown,
.choices__list--dropdown .choices__list{scrollbar-width:none !important;-ms-overflow-style:none !important;}
.choices__list--dropdown::-webkit-scrollbar,
.choices__list--dropdown .choices__list::-webkit-scrollbar{display:none !important;}
.choices__list--dropdown .choices__item--selectable.is-highlighted{
  background:#f5f5f5 !important;color:#374151 !important;
}

#pf-toast{
  position:fixed;top:-200px;left:50%;transform:translateX(-50%);
  background:#47B881;color:#fff;padding:12px 16px;border-radius:8px;
  box-shadow:0 4px 16px rgba(0,0,0,.18);font-size:13px;font-family:sans-serif;padding-top:9px;padding-bottom:9px;
  z-index:100002;display:flex;align-items:center;gap:10px;
  transition:top .35s ease;max-width:calc(100vw - 40px)
}
#pf-toast.pf-show{top:100px}
#pf-toast.pf-error{background:var(--st-red)}
#pf-toast.pf-neutral{background:#374151}
#pf-toast.pf-dataout{background:var(--st-teal)}
/* links inside the red error message (e.g. "mark it as a batch file"): soft yellow, underlined, so they read on red */
#pf-toast.pf-error a{color:#FDE68A !important;text-decoration:underline !important}
#pf-toast svg{stroke:#fff !important;fill:none !important}
.pf-toast-msg{display:flex;align-items:center;gap:9px;line-height:1.4}
.pf-toast-tick,.pf-toast-alert,.pf-toast-copy{width:18px;height:18px;stroke-width:2.2;flex-shrink:0}
.pf-toast-alert,.pf-toast-copy{display:none}
#pf-toast.pf-error .pf-toast-tick{display:none}
#pf-toast.pf-error .pf-toast-alert{display:block}
#pf-toast.pf-dataout .pf-toast-tick{display:none}
#pf-toast.pf-dataout .pf-toast-copy{display:block}
#pf-toast.pf-neutral .pf-toast-tick,
#pf-toast.pf-neutral .pf-toast-alert{display:none}
.pf-toast-close{width:24px;height:24px;border:0;border-radius:50%;background:transparent;color:#fff;opacity:.75;margin-right:-5px;cursor:pointer;text-shadow:none;font:inherit;line-height:1;padding:0;display:flex;align-items:center;justify-content:center}
.pf-toast-close:hover{background:transparent;opacity:1}
.pf-toast-close svg{width:14px;height:14px;stroke-width:2.2}

/* ==========================================================================
   KEBAB / EXPORT DROPDOWN
   Container stays position:static inside the position:relative .st-headerbar,
   so the panel's right:0 resolves against the card and lands flush with it.
   ========================================================================== */
.st-page .pr-dropdown-container{position:static;flex-shrink:0;width:28px;height:28px;margin:0 -2px 0 6px}
.st-page .pr-dropdown-trigger{width:28px;height:28px;padding:6px;box-sizing:border-box;border-radius:50%;cursor:pointer;color:#000;background:none;border:none;transition:background-color .15s ease,color .15s ease}
.st-page .pr-dropdown-trigger:hover{background-color:rgba(29,155,240,.15);color:#1d9bf0}
.st-page .pr-export-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid var(--st-line);border-radius:15px;padding:8px 0;min-width:200px;box-shadow:0 4px 12px rgba(0,0,0,.1);z-index:100000;font-size:11px;display:none}
.st-page .pr-export-dropdown.pr-show{display:block}
.st-page .pr-dropdown-item{display:flex;align-items:center;padding:10px 16px;margin:0 6px;border-radius:10px;font-size:12px;color:#000;text-decoration:none;white-space:nowrap;cursor:pointer}
.st-page .pr-dropdown-item:hover{background-color:#e8f4fd;color:#1976d2}
.st-page .pr-dropdown-item.pr-download-item:hover{background-color:#f0fbf7;color:#00897b}
.st-page .pr-dropdown-item svg{margin-right:8px;width:15px;height:15px;stroke-width:1.5}
.st-page .pr-dropdown-separator{margin:4px 12px;border:none;border-top:1px solid var(--st-line);height:1px}

/* ==========================================================================
   FLATPICKR  —  platform standard v3 (rounded-square marker)
   Requires ../flatpickr/flatpickr.min.css loaded before this file.
   z-index sits above the kebab panel (100000).
   ========================================================================== */
.flatpickr-calendar{
  font-family:sans-serif !important;font-size:12px !important;
  border:1px solid var(--st-line) !important;border-radius:8px !important;
  box-shadow:0 4px 12px rgba(0,0,0,.1) !important;
  width:252px !important;box-sizing:border-box !important;z-index:100005 !important
}
.flatpickr-calendar *{box-sizing:border-box}
.flatpickr-days,.dayContainer,.flatpickr-weekdays{width:238px !important;min-width:238px !important;max-width:238px !important;margin:0 auto !important}
.flatpickr-day{
  max-width:34px !important;height:34px !important;line-height:34px !important;
  font-size:12px !important;border-radius:8px !important;border-color:transparent !important
}
.flatpickr-current-month,.flatpickr-current-month input.cur-year,.flatpickr-monthDropdown-months{font-size:13px !important}
.flatpickr-current-month input.cur-year{width:5ch !important}
.numInputWrapper{padding:1px 9px !important;border-radius:4px !important}
span.flatpickr-weekday{font-size:11px !important}

/* TODAY = pale tint, SELECTED = solid green, today-when-selected goes solid */
.flatpickr-day.today{background:#E1F5EE !important;color:#0F6E56 !important;border-color:transparent !important}
.flatpickr-day.today:hover{background:#C9EDDD !important;color:#0F6E56 !important}
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.today.selected{background:var(--st-green) !important;color:#fff !important;border-color:var(--st-green) !important}

/* in-field calendar icon — MUST be a background shorthand to beat the legacy
   input[type="text"]{background:white !important} rules */
.st-page input[type="text"].flatpickr-input{
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat right 10px center !important;
  padding-right:30px !important;cursor:pointer !important
}
.flatpickr-input,.flatpickr-input + input{cursor:pointer}

/* =========================================================
   Details slide-in panel + modal on top of it
   Added 11 Sep 2026. First used on applications_withdrawal.php (cash requests).
   Floating panel like the chats page: 16px from the edges, 12px corners.
   Buttons carry !important because style.css button rules bleed in.
   ========================================================= */

.st-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(17,24,39,.35);z-index:99980;opacity:0;visibility:hidden;transition:opacity .2s,visibility .2s}
.st-overlay.st-show{opacity:1;visibility:visible}

.st-panel{position:fixed;top:16px;right:16px;bottom:16px;width:440px;max-width:calc(100% - 32px);background:#fff;border:1px solid #E0E0E0;border-radius:12px;z-index:99990;display:flex;flex-direction:column;overflow:hidden;transform:translateX(calc(100% + 32px));visibility:hidden;transition:transform .25s ease,visibility .25s;font-family:-apple-system,"system-ui","Segoe UI",Roboto,sans-serif;font-size:13px;color:#111827;text-align:left;line-height:1.4}
.st-panel.st-show{transform:translateX(0);visibility:visible}
.st-panel *,.st-modal-wrap *{box-sizing:border-box}

.st-panel-head{display:flex;align-items:center;gap:8px;flex:none;padding:10px 10px 10px 18px;border-bottom:1px solid #eee;min-height:50px}
.st-panel-title{font-size:15px;font-weight:500;color:#111827}
.st-panel-close{margin:0 0 0 auto!important;width:28px!important;height:28px!important;padding:0!important;border:none!important;border-radius:6px!important;background:transparent!important;color:#9ca3af!important;display:flex!important;align-items:center;justify-content:center;cursor:pointer;box-shadow:none!important;text-shadow:none!important}
.st-panel-close:hover{background:#f3f4f6!important;color:#374151!important}

.st-panel-body{flex:1;overflow-y:auto;padding:14px 18px 18px}
.st-panel-card{border:1px solid #E0E0E0;border-radius:8px;overflow:hidden}
.st-panel-summary{padding:12px 14px}
.st-panel-name{font-size:14px;font-weight:500}
.st-panel-sub{font-size:12px;color:#6b7280}
.st-panel-amount{font-size:22px;margin-top:10px;font-family:sans-serif}
.st-panel-sec{font-size:12px;color:#6b7280;margin:16px 0 6px}

.st-panel-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:8px 12px;border-top:1px solid #f3f4f6}
.st-panel-row:first-child{border-top:none}
.st-panel-row > span:first-child{color:#6b7280;flex:none}
.st-panel-row > span:last-child{text-align:right;min-width:0;word-break:break-word}
.st-panel-red,.st-modal-danger .st-modal-title{color:#b91c1c}
.st-table td .st-cell-sub,.st-table tr.st-muted td .st-cell-sub{display:block;font-family:sans-serif;font-size:10px;font-weight:normal;color:#9ca3af;line-height:1.3;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st-payee-wrap{display:flex;align-items:center;gap:8px;min-width:0}
.st-payee-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.st-table td .st-vpill,.st-table tr.st-muted td .st-vpill{flex-shrink:0;font-family:sans-serif;font-size:9px;font-weight:normal;line-height:1.4;color:#9ca3af;background:transparent;border:1px solid #e5e7eb;border-radius:4px;padding:0 4px;white-space:nowrap}
.st-lead{display:flex;align-items:center;gap:10px;min-width:0}
.st-lead-dot{display:inline-flex;width:8px;flex-shrink:0}
.st-bars{display:inline-flex;gap:3px;vertical-align:middle}
.st-bar{display:block;width:14px;height:5px;border-radius:3px}
.st-bar.st-bar-off{background:#e5e7eb}
.st-bar.st-bar-done{background:#b4b2a9}
.st-panel-num{font-family:sans-serif}
.st-panel-bank{border-top:1px solid #f3f4f6;padding-bottom:10px}
.st-panel-bank:first-child{border-top:none}
.st-panel-bank .st-panel-row{border-top:none}
.st-panel-line2{display:block;margin-top:2px}
.st-panel-verify{display:flex!important;align-items:center;justify-content:center;gap:6px;width:calc(100% - 24px)!important;height:34px!important;margin:2px 12px 0!important;padding:0 12px!important;border:1px solid #BFDBFE!important;border-radius:6px!important;background:#EFF6FF!important;color:#0969DA!important;font:inherit!important;font-size:13px!important;font-weight:500!important;line-height:normal!important;cursor:pointer;box-shadow:none!important;text-shadow:none!important}
.st-panel-verify:hover{background:#DBEAFE!important;border-color:#93C5FD!important}
.st-panel-verify svg{flex:none}
.st-panel-verify.st-busy{cursor:progress}

/* label that slides up to swap text, e.g. Verify -> Checking... (add st-busy to the button) */
.st-swap{position:relative;display:inline-grid;overflow:hidden;height:18px;line-height:18px}
.st-swap-a,.st-swap-b{grid-area:1/1;display:block;white-space:nowrap;transition:transform .25s ease,opacity .25s ease}
.st-swap-b{transform:translateY(100%);opacity:0}
.st-busy .st-swap-a{transform:translateY(-100%);opacity:0}
.st-busy .st-swap-b{transform:translateY(0);opacity:1}
@media (prefers-reduced-motion:reduce){.st-swap-a,.st-swap-b{transition:none}}

/* modals holding a Choices list: let the list hang past the modal edge instead of being cut off */
.st-modal:has(.choices),
.st-modal:has(.choices) .st-modal-body{overflow:visible !important}
.st-modal:has(.choices) .st-modal-foot{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}

/* data-out panel button (teal outline), e.g. Statement */
.st-pbtn.st-pbtn-dataout{background:#fff !important;color:#0d9488 !important;border:1px solid #d1d5db !important;display:inline-flex !important;align-items:center;gap:5px}
.st-pbtn.st-pbtn-dataout:hover{background:#f0fbf7 !important;border-color:#0d9488 !important}
.st-pbtn-dataout svg{width:14px;height:14px;flex:none}
/* pushes the buttons after it to the right edge of a panel footer */
.st-panel-actions .st-panel-spacer{flex:1}

/* checkbox: green fill with a white tick when ticked */
input[type="checkbox"].st-check{-webkit-appearance:none;appearance:none;width:16px;height:16px;margin:0;border:1.5px solid #cbd5e1;border-radius:4px;background:#fff;cursor:pointer;vertical-align:middle;box-sizing:border-box}
input[type="checkbox"].st-check:checked{background:#47B881 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') no-repeat center / 11px 11px;border-color:#47B881}
input[type="checkbox"].st-check:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(71,184,129,.25)}

.st-steps{display:flex;gap:8px}
.st-step{flex:1;min-width:0}
.st-step-bar{height:5px;border-radius:3px;background:#e5e7eb}
.st-step.st-done .st-step-bar{background:#47B881}
.st-step-name{font-size:12px;margin-top:6px}
.st-step-who{font-size:12px;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.st-panel-msgrow{display:flex;align-items:flex-end;gap:6px}
.st-panel-msgrow textarea{display:block;flex:1;min-width:0;width:auto!important;height:34px!important;margin:0!important;padding:8px 10px!important;border:1px solid #d9d9d9!important;border-radius:6px!important;background:#fff!important;font:inherit!important;font-size:13px!important;line-height:16px!important;color:#111827!important;box-shadow:none!important;resize:none!important}
.st-panel-msgrow textarea:focus{outline:none;border-color:#9ca3af!important}

.st-panel-foot{flex:none;border-top:1px solid #eee;padding:12px 18px}
.st-panel-decl{display:flex;gap:8px;align-items:flex-start;margin:0 0 10px;font-size:12px;color:#374151;line-height:18px;cursor:pointer}
.st-panel-decl input[type="checkbox"]{display:inline-block!important;visibility:visible!important;opacity:1!important;position:static!important;-webkit-appearance:checkbox!important;appearance:checkbox!important;width:14px!important;height:14px!important;margin:3px 0 0!important;flex:none;cursor:pointer}
.st-panel-err{margin:-4px 0 10px;font-size:12px;color:#b91c1c}
.st-panel-actions{display:flex;justify-content:flex-end;gap:8px}
.st-panel-note{font-size:12px;color:#6b7280}

/* panel + modal buttons */
.st-pbtn{width:auto!important;height:34px!important;margin:0!important;padding:0 16px!important;border-radius:6px!important;font:inherit!important;font-size:13px!important;line-height:normal!important;cursor:pointer;text-shadow:none!important;box-shadow:none!important}
.st-pbtn-primary{background:#000!important;border:1px solid #000!important;color:#fff!important}
.st-pbtn-primary:hover{background:rgb(23,23,23)!important}
.st-pbtn-primary:disabled,.st-pbtn-primary:disabled:hover{background:#e5e7eb!important;border-color:#e5e7eb!important;color:#9ca3af!important;cursor:not-allowed}
/* working state (Saving…, Charging…) — stays black, unlike a plain disabled button */
.st-pbtn-primary.st-busy,.st-pbtn-primary.st-busy:disabled,.st-pbtn-primary.st-busy:disabled:hover{background:#000!important;border-color:#000!important;color:#fff!important;cursor:default}
.st-pbtn-spin{display:inline-block;width:12px;height:12px;box-sizing:border-box;margin-right:7px;vertical-align:-2px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:st-spin .7s linear infinite}
.st-pbtn-secondary{background:#fff!important;border:1px solid #d9d9d9!important;color:#111827!important}
.st-pbtn-secondary:hover{background:#f5f5f5!important;border-color:#b3b3b3!important}
.st-pbtn-danger{background:#fff!important;border:1px solid #d9d9d9!important;color:#b91c1c!important}
.st-pbtn-danger:hover{background:#f5f5f5!important;border-color:#b3b3b3!important}
.st-pbtn-send{background:#47B881!important;border:1px solid #47B881!important;color:#fff!important}
.st-pbtn-send:hover{background:#399C6C!important;border-color:#399C6C!important}

/* modal on top of the panel */
.st-modal-wrap{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(17,24,39,.35);z-index:99995;display:none;align-items:center;justify-content:center;padding:16px}
.st-modal-wrap.st-show{display:flex}
.st-modal{width:400px;max-width:100%;background:#fff;border:1px solid #E0E0E0;border-radius:12px;overflow:hidden;font-family:-apple-system,"system-ui","Segoe UI",Roboto,sans-serif;font-size:13px;color:#111827;text-align:left}
.st-modal-head{display:flex;align-items:center;gap:8px;padding:10px 10px 10px 18px;border-bottom:1px solid #eee;min-height:50px}
.st-modal-title{font-size:15px;font-weight:500}
.st-modal-body{padding:16px 18px;line-height:1.5;color:#374151}
.st-modal-nofoot .st-modal-body{padding-bottom:40px}
.st-modal-body.st-modal-center{text-align:center}
.st-modal-foot{display:flex;justify-content:flex-end;gap:8px;padding:0 18px 16px}

/* bank verification result (markup comes from verify_cash_request_bank.php) */
.st-vbanner{display:flex;align-items:flex-start;gap:8px;margin-bottom:12px;padding:9px 12px;border-radius:6px;line-height:1.45}
.st-vbanner:last-child{margin-bottom:0}
.st-vbanner svg{flex:none;width:16px;height:16px;margin-top:1px}
.st-vbanner-ok{background:#ECF8F2;border:1px solid #C5E9D6;color:#1F7A4D}
.st-vbanner-warn{background:#FEF6E7;border:1px solid #F5DDAA;color:#8A5A00}
.st-vbanner-bad{background:#FEF2F2;border:1px solid #FECACA;color:#b91c1c}
.st-vwarn{color:#8A5A00}

/* =========================================================
   Loan application panel extras + AI credit assessment modal
   Added 11 Sep 2026. First used on the loan applications page.
   ========================================================= */

/* amount in the summary card; double-clicking it shows the pencil */
.st-panel-amountrow{display:flex;align-items:center;gap:6px;margin-top:10px}
.st-panel-amountrow .st-panel-amount{margin-top:0}
.st-panel-edit{display:none!important;width:26px!important;height:26px!important;margin:0!important;padding:0!important;border:none!important;border-radius:6px!important;background:transparent!important;color:#3b82f6!important;align-items:center;justify-content:center;cursor:pointer;box-shadow:none!important;text-shadow:none!important}
.st-panel-edit.st-on{display:flex!important}
.st-panel-edit:hover{background:#EFF6FF!important}
.st-panel-edit svg{width:15px;height:15px;stroke:currentColor!important;fill:none!important}

.st-panel a.st-panel-link{color:#0969DA!important;text-decoration:none!important;font-weight:normal!important}
.st-panel a.st-panel-link:hover{text-decoration:underline!important}
.st-panel-amber{color:#b45309}

/* AI credit assessment button, under the summary card */
.st-panel-ai{display:flex!important;align-items:center;justify-content:center;gap:6px;width:100%!important;height:34px!important;margin:10px 0 0!important;padding:0 12px!important;border:1px solid #DDD6FE!important;border-radius:6px!important;background:#F5F3FF!important;color:#6D28D9!important;font:inherit!important;font-size:13px!important;font-weight:500!important;line-height:normal!important;cursor:pointer;box-shadow:none!important;text-shadow:none!important}
.st-panel-ai:hover{background:#EDE9FE!important;border-color:#C4B5FD!important}
.st-panel-ai svg{flex:none;stroke:currentColor!important;fill:none!important}

/* a field inside the modal (change loan amount) */
.st-modal-field .st-label{display:block}
.st-modal-field input[type="text"]{width:100%!important;font-size:13px!important}
.st-modal-hint{font-size:12px;color:#6b7280;margin-top:6px}

/* AI assessment modal: wider, scrolls inside, kebab next to the close button */
.st-modal.st-modal-ai{width:520px;display:flex;flex-direction:column;max-height:calc(100vh - 32px);position:relative}
.st-modal-ai::after{content:"";position:absolute;left:0;right:0;bottom:0;height:40px;background:linear-gradient(rgba(255,255,255,0),#fff);pointer-events:none;opacity:0;transition:opacity .2s}
.st-modal-ai.st-more::after{opacity:1}
.st-modal-ai .st-modal-head{position:relative;flex:none}
.st-modal-ai .st-modal-title{margin-right:auto}
.st-modal-ai .st-panel-close{margin:0!important}
.st-page .st-modal-ai .pr-dropdown-container{margin:0}
.st-modal-ai .st-modal-body{flex:1;overflow-y:auto;padding:14px 18px 22px}

.st-ai-loading{padding:48px 0;text-align:center;color:#6b7280;font-size:13px}
.st-ai-loading .st-spinner{width:26px;height:26px;margin:0 auto 12px}

.st-ai-score{display:flex;flex-direction:column;align-items:center;padding:12px 0 2px}
.st-ai-gauge{position:relative;width:150px;height:150px}
.st-ai-gauge canvas{display:block}
.st-ai-value{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:sans-serif;font-size:32px;color:#111827}
.st-ai-risk{font-size:12px;padding:3px 12px;border-radius:12px;margin-top:2px}

.st-ai-factor{margin-bottom:8px;opacity:0;animation:st-ai-in .35s ease forwards}
@keyframes st-ai-in{from{opacity:0;transform:translateX(12px)}to{opacity:1;transform:none}}

.st-ai-chart{display:flex;justify-content:center;padding:10px}
.st-ai-text{font-size:13px;line-height:1.6;color:#374151}
.st-ai-rec{background:#F5F3FF;border:1px solid #DDD6FE;border-radius:8px;padding:10px 12px}
.st-ai-caret{display:inline-block;width:2px;height:14px;margin-left:1px;vertical-align:-2px;background:#6D28D9;animation:st-ai-blink 1s steps(1) infinite}
@keyframes st-ai-blink{50%{opacity:0}}

@media (prefers-reduced-motion:reduce){
  .st-ai-factor{animation:none;opacity:1}
  .st-ai-caret{animation:none}
}

/* PDF copy of the assessment (built off-screen by html2pdf) */
.st-ai-print{font-family:-apple-system,"system-ui","Segoe UI",Roboto,sans-serif;font-size:13px;color:#111827;padding:4px}
.st-ai-print .st-modal-title{display:block;margin-bottom:12px}
.st-ai-print .st-ai-score{padding:16px 0 4px}
.st-ai-print .st-ai-value-print{position:static;transform:none}

/* numbers inside the AI assessment panel */
.st-panel-num{font-family:sans-serif}

/* numbers in the AI assessment modal */
.st-panel-num{font-family:sans-serif}
.st-ai-value{font-family:sans-serif}

/* ── Green action button (data-out: Generate Statement, statements, exports) ──
   Use on any st-page button: class="st-btn st-btn-green". Plain legacy pages
   can just reference var(--st-green) / var(--st-green-hover) directly. */
.st-btn-green { background: var(--st-green) !important; color: #fff !important; border-color: var(--st-green) !important; }
.st-btn-green:hover { background: var(--st-green-hover) !important; border-color: var(--st-green-hover) !important; }

.st-panel-print{width:28px!important;height:28px!important;min-width:0!important;display:flex;align-items:center;justify-content:center;margin-left:auto;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;text-shadow:none!important;color:#6b7280!important;border-radius:6px!important;line-height:1;cursor:pointer}
.st-panel-print:hover{background:#f3f4f6!important;color:#1f2937!important}
.st-panel-print + .st-panel-close{margin-left:0!important}
.st-print-head{display:none}
@media print{
	body *{visibility:hidden}
	.st-panel,.st-panel *{visibility:visible}
	.st-panel{position:absolute!important;left:0;top:0;right:auto;width:100%;max-width:none;height:auto;max-height:none;border:0;box-shadow:none;transform:none!important}
	.st-overlay,.st-panel-head,.st-panel-close,.st-panel-print,.st-panel-edit,.st-panel-foot,.st-panel-msgrow,.st-panel-verify,.st-panel-ai,.st-noprint{display:none!important}
	.st-panel-body{overflow:visible!important;height:auto!important;max-height:none!important;min-height:0!important;padding-bottom:0!important}
	.st-panel{min-height:0!important;overflow:visible!important}
	html,body{height:auto!important}
	.st-print-head{display:flex!important;justify-content:space-between;align-items:baseline;border-bottom:1px solid #111;padding-bottom:8px;margin-bottom:14px;font-size:15px}
}

/* ---------- print: panel only, no trailing blank page ---------- */
@media print {
	body:has(.st-panel.st-show) html,
	body:has(.st-panel.st-show) { height: auto !important; min-height: 0 !important; overflow: visible !important; }

	body:has(.st-panel.st-show) .wrap:not(:has(.st-panel.st-show)) { display: none !important; }

	/* panel inside the page area (Purchase Mandate, Property Mandate): hide everything except
	   the boxes that hold the open panel, and flatten those so they add no height */
	body:has(.st-panel.st-show) *:not(:has(.st-panel.st-show)):not(.st-panel.st-show):not(.st-panel.st-show *) { display: none !important; }
	body:has(.st-panel.st-show) *:has(.st-panel.st-show) { height: auto !important; min-height: 0 !important; max-height: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; overflow: visible !important; position: static !important; float: none !important; background: none !important; }

	body:has(.st-panel.st-show) .st-overlay { display: none !important; }

	body:has(.st-panel.st-show) .st-panel {
		position: static !important;
		width: auto !important;
		height: auto !important;
		max-height: none !important;
		overflow: visible !important;
		transform: none !important;
		box-shadow: none !important;
		border: 0 !important;
	}

	body:has(.st-panel.st-show) .st-panel-body {
		height: auto !important;
		max-height: none !important;
		overflow: visible !important;
	}

	body:has(.st-panel.st-show) .st-panel > *:last-child,
	body:has(.st-panel.st-show) .st-panel-body > *:last-child {
		page-break-after: avoid !important;
		break-after: avoid !important;
	}
}

/* Choices — standard focus ring for every dropdown */
.choices.is-focused .choices__inner,
.choices.is-open .choices__inner {
  outline: none !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15) !important;
}

/* Choices — closed box, same size and border as the other st-page fields */
.st-page .choices,.st-modal .choices{margin:0 !important;font-size:12px}
.st-page .choices__inner,.st-modal .choices__inner{
  background:#fff !important;border:1px solid #d9d9d9 !important;border-radius:6px !important;
  padding:4px 10px !important;min-height:30px !important;max-height:30px !important;
  font-size:12px !important;line-height:20px !important;box-sizing:border-box !important
}
.st-page .choices__list--single,.st-modal .choices__list--single{padding:0 18px 0 0 !important}
.st-page .choices__list--single .choices__item,.st-modal .choices__list--single .choices__item{padding:0 !important;line-height:20px !important;color:var(--st-ink) !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Choices — thin chevron instead of the solid triangle, same when open */
.choices[data-type*=select-one]::after{
  content:"" !important;
  background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>') no-repeat center / 12px 12px !important;
  border:none !important;width:12px !important;height:12px !important;margin-top:0 !important;
  top:50% !important;transform:translateY(-50%) !important;right:8px !important
}

/* Choices — open list: one line per item, cut with "…", sits above tables and cards */
.choices__list--dropdown{
  background:#fff !important;border:1px solid var(--st-line) !important;border-radius:8px !important;
  padding:6px 0 !important;margin-top:4px !important;box-shadow:0 2px 8px rgba(0,0,0,.08) !important;
  z-index:10000 !important;width:max-content !important;min-width:100% !important;max-width:360px !important
}
.choices__list--dropdown .choices__item{
  position:relative;padding:6px 30px 6px 12px !important;margin:0 4px !important;border-radius:6px !important;
  font-size:12px !important;line-height:20px !important;color:var(--st-ink) !important;
  white-space:nowrap !important;overflow:hidden;text-overflow:ellipsis
}
/* group headings (from <optgroup>) */
.choices__list--dropdown .choices__heading{
  padding:8px 12px 4px !important;margin:0 !important;border-bottom:none !important;
  font-size:10px !important;font-weight:600 !important;color:var(--st-faint) !important;
  text-transform:uppercase;letter-spacing:.04em
}
.choices__list--dropdown .choices__group + .choices__group{border-top:1px solid #f0f0f0;margin-top:4px}
/* chosen row: blue with a tick (hover stays the grey above) */
.choices__list--dropdown .choices__item--selectable.is-selected{
  background:#e8f4fd url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%231976d2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') no-repeat right 10px center / 14px 14px !important;
  color:#1976d2 !important
}
.choices__list--dropdown .choices__item--selectable.is-selected::after{display:none !important}

/* Choices.js group headings (optgroup labels): sentence case, small grey, no line under them. Unscoped so it also works inside modals */
.choices__list--dropdown .choices__heading{text-transform:none !important;letter-spacing:0 !important;font-weight:500 !important;font-size:11px !important;color:#9ca3af !important;padding:8px 12px 4px !important;border-bottom:none !important;font-family:-apple-system,"system-ui","Segoe UI",Roboto,sans-serif !important}

/* kebab divider line */
.st-page .pr-export-dropdown hr { height: 0 !important; margin: 4px 12px !important; padding: 0 !important; border: 0 !important; border-top: 1px solid #e0e0e0 !important; background: none !important; }

/* kebab font - don't depend on the page wrapper */
.st-page .pr-export-dropdown, .st-page .pr-export-dropdown .pr-dropdown-item { font-family: -apple-system, BlinkMacSystemFont, "system-ui", "Segoe UI", Roboto, sans-serif !important; }

/* Large button: the single main action that finishes a form or modal, on its own line. Buttons that sit beside 30px fields stay at the normal size */
#main.st-main .st-btn.st-btn-lg,#main .st-btn.st-btn-lg,.st-page .st-btn.st-btn-lg,.st-btn.st-btn-lg{display:inline-flex !important;align-items:center !important;justify-content:center !important;height:35px !important;min-height:35px !important;max-height:none !important;line-height:normal !important;padding:0 24px !important;font-size:13px !important;border-radius:6px !important;box-sizing:border-box !important}

/* ==========================================================================
   SWITCH (on / off) — platform standard from 5 Oct 2026: the Business Settings switch
   Markup:  <input type="checkbox" class="st-switch" id="x" /><label for="x"></label>
   Unscoped on purpose: switches also sit inside modals, outside the page wrapper
   ========================================================================== */
input.st-switch { position:absolute; opacity:0; width:0; height:0; }
input.st-switch + label { display:block; position:relative; flex:0 0 40px; width:40px; height:15px; margin:0 2px 0 0; padding:0; border-radius:100px; background:#e0e0e0; cursor:pointer; transition:all .3s ease; }
input.st-switch + label:after { content:''; position:absolute; left:-2px; top:-2px; width:20px; height:20px; border-radius:100px; background:#909090; box-shadow:0px 3px 3px rgba(0,0,0,.35); transition:all .3s ease; }
input.st-switch + label:active:after { transform:scale(1.15, .85); }
input.st-switch:checked + label:after { left:20px; background:#179588; }
input.st-switch:focus-visible + label { box-shadow:0 0 0 3px rgba(59,130,246,.15); }
input.st-switch:disabled + label { opacity:.6; cursor:default; pointer-events:none; }

/* WORKING BUTTON STANDARD (5 Oct 2026)
   Any button showing Saving… / Posting… / Creating… fades to 60% and can't be clicked again.
   Catches every "-busy" class (st-busy, ma-busy, adm-busy …) so no page sets its own fade. */
button[class*="-busy"],input[class*="-busy"]{opacity:.7!important;pointer-events:none!important}

/* ==========================================================================
   RECEIPT (inside the standard st-modal) — one receipt for every posting page.
   Used by Service Billing and Direct Deposits. .st-rchead (logo + cooperative
   name) is hidden on screen and switched on only for the downloaded copy.
   <div class="st-rc"> .st-rchead / .st-rcname / .st-rcsub / .st-rcrow x n </div>
   ========================================================================== */
.st-rc{background:#fff;font-family:sans-serif;color:#111827}
.st-rchead{display:none;text-align:center;padding:0 0 14px;border-bottom:1px solid #e5e7eb;margin-bottom:14px}
.st-rchead img{display:block;max-height:44px;max-width:160px;margin:0 auto 8px}
.st-rchead b{display:block;font-size:14px;font-weight:500;color:#111827}
.st-rchead span{display:block;font-size:12px;color:#6b7280;margin-top:2px}
.st-rcname{font-size:14px;font-weight:500;color:#111827}
.st-rcsub{font-size:12px;color:#6b7280;margin-bottom:10px}
.st-rcrow{display:flex;justify-content:space-between;gap:16px;padding:8px 0;border-top:1px solid #f3f4f6;font-size:13px}
.st-rcrow span:first-child{color:#6b7280;flex:none}
.st-rcrow span:last-child{text-align:right;word-break:break-word}

/* ==========================================================================
   SEGMENTS (pick one of two or three) — platform standard from 8 Oct 2026
   Selected segment: light blue background #e8f4fd, dark blue text #1565c0
   Markup:
     <div class="st-seg">
       <label><input type="radio" name="x" value="a" checked="checked" /><span>First</span></label>
       <label><input type="radio" name="x" value="b" /><span>Second</span></label>
     </div>
   Fills the width of its cell. Add st-seg-fit to make it only as wide as its text.
   Unscoped on purpose: segments also sit inside modals, outside the page wrapper
   ========================================================================== */
.st-seg, .st-seg * { box-sizing:border-box; }
.st-seg { display:flex; height:30px; border:1px solid #d9d9d9; border-radius:6px; overflow:hidden; background:#fff; }
.st-seg label, #main .st-seg label { flex:1; display:block !important; position:relative; margin:0 !important; padding:0 !important; font-weight:normal !important; cursor:pointer; border-right:1px solid #d9d9d9; }
.st-seg label:last-child, #main .st-seg label:last-child { border-right:none; }
.st-seg input { position:absolute; opacity:0; width:1px; height:1px; margin:0; pointer-events:none; }
.st-seg label span, #main .st-seg label span { display:flex !important; align-items:center; justify-content:center; height:28px; margin:0 !important; padding:0 12px !important; font-size:12px !important; font-weight:normal !important; font-family:sans-serif !important; color:#374151 !important; white-space:nowrap; transition:background-color .15s ease; }
.st-seg label:hover span { background:#f5f5f5; }
.st-seg input:checked + span, .st-seg label:hover input:checked + span, #main .st-seg input:checked + span, #main .st-seg label:hover input:checked + span { background:#e8f4fd !important; color:#1565c0 !important; }
.st-seg input:focus-visible + span { box-shadow:inset 0 0 0 2px rgba(59,130,246,.35); }
.st-seg.st-seg-fit { display:inline-flex; align-self:flex-start; }
.st-seg.st-seg-fit label, #main .st-seg.st-seg-fit label { flex:none; }

/* Cash request panel: notice under the summary card when the withdrawal limit was raised for the request and dropped after (get_cash_request.php). Sits on the st-vbanner-warn banner */
.st-panel-limit{margin:10px 0 0}
.st-panel-limit-title{font-weight:500}
.st-panel-limit-text{font-size:12px;margin-top:2px}
.st-panel-limit-text + .st-panel-limit-title{margin-top:8px}

/* read-only fields: show the no-entry cursor on hover */
#main input.st-readback,
#main textarea.st-readback{cursor:not-allowed !important}

/* ===== Dotted segments (12 Nov 2026) - for choices INSIDE a form (No / Yes, Monthly / Annually, Receiving / Sending).
   Add st-seg-dot next to st-seg. NOT for the mode tabs at the top of a page (One member / All members / Self transfer):
   those stay plain st-seg. Label on the left, radio circle on the right: circle 10px, dot 4px. ===== */
#main .st-seg.st-seg-dot label{flex:1 1 0 !important;display:flex !important;padding:0 !important}
#main .st-seg.st-seg-dot label span{flex:1 !important;display:flex !important;align-items:center !important;justify-content:space-between !important;padding:0 10px !important}
#main .st-seg.st-seg-dot label span::after{content:"" !important;flex:none;width:10px;height:10px;margin-left:8px;border-radius:50%;border:1.25px solid #9ca3af;background:#fff;box-sizing:border-box}

/* Chip strip attached to the top of a table card (Payroll History, Online Payments, Transaction History).
   Markup: <div class="st-chipbar">…</div> followed directly by the table card. */
.st-chipbar {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid #E0E0E0; border-bottom: none;
    border-radius: 8px 8px 0 0; padding: 8px 14px;
    font-family: sans-serif;
}
.st-chipbar + .table-container { border-radius: 0 0 8px 8px !important; }
.st-chipbar[style*="none"] + .table-container { border-radius: 8px !important; }   /* strip hidden → the table keeps all four corners */
.st-chip { font-size: 11px; color: #6b7280; background: #f4f4f5; border-radius: 9px; padding: 2px 9px; white-space: nowrap; }
.st-chip.paid, .st-chip.in { color: #16a34a; background: #f0fdf4; }
.st-chip-criteria { font-size: 11px; color: #6b7280; margin-right: auto; }
#main .st-seg.st-seg-dot input:checked + span::after{border-color:#1565c0;background:radial-gradient(circle,#1565c0 0 2px,#fff 2.5px)}

/* ==========================================================================
   HOVER NOTE (16 Nov 2026) — the dark bubble, shows at once, opens just under the item.
   Use instead of the browser's own title note, which is slow and unclear.
   Markup: <span class="st-tip" data-tip="Your note">…</span>
   Add st-tip-right when the item sits near the right edge, so the bubble lines up with its right side.
   Input boxes can't carry it — put it on the box's wrapper.
   ========================================================================== */
.st-tip{position:relative}
.st-tip[data-tip]::after{
  content:attr(data-tip);position:absolute;left:0;top:calc(100% + 6px);
  width:max-content;max-width:180px;white-space:normal;text-wrap:balance;
  background:#111827;color:#fff;font-family:sans-serif;font-size:11px;font-weight:400;line-height:1.4;
  padding:7px 9px;border-radius:6px;box-shadow:0 4px 12px rgba(0,0,0,.18);
  z-index:100001;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s ease
}
.st-tip.st-tip-right[data-tip]::after{left:auto;right:0}
.st-tip[data-tip]:hover::after{opacity:1;visibility:visible}

/* Long-standing debts — red strip under the header bar + clock row tag (rec_repayments.php, Purchase Mandate page) */
.rr-stale-strip { display: flex; align-items: center; gap: 10px; margin: -8px 0 16px; padding: 9px 14px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; font-family: sans-serif; box-sizing: border-box; }
.rr-stale-strip > svg { width: 18px; height: 18px; flex: none; color: #7f1d1d; }
.rr-stale-text { flex: 1; min-width: 0; font-size: 12px; color: #7f1d1d; line-height: 1.5; }
.rr-stale-text b { font-weight: 600; }
.rr-stale-btn { flex: none; background: #dc2626; color: #fff !important; font-size: 11px; font-weight: 500; border-radius: 6px; padding: 5px 12px; white-space: nowrap; text-decoration: none !important; }
.rr-stale-btn:hover { background: #b91c1c; }
.rr-tag { display: table; border-collapse: separate; font-size: 10px !important; font-weight: 500; line-height: 1.5; padding: 1px 7px 1px 5px; border-radius: 10px; margin-top: 2px; white-space: nowrap; vertical-align: middle; background: #fef2f2; color: #b91c1c; }
.rr-tag svg { width: 11px; height: 11px; vertical-align: -2px; margin-right: 3px; }
/* Amber version — a follow-up, not money owed (Savings Records: members with no contribution for 6+ months) */
.rr-stale-strip.st-amber { background: #fffbeb; border-color: #fde68a; }
.rr-stale-strip.st-amber > svg { color: #d97706; }
.rr-stale-strip.st-amber .rr-stale-text { color: #78350f; }
.rr-stale-strip.st-amber .rr-stale-btn { background: #d97706; }
.rr-stale-strip.st-amber .rr-stale-btn:hover { background: #b45309; }
.rr-tag.st-amber { background: #fffbeb; color: #b45309; }

/* Section titles on long settings pages: baby blue card titles (the old Business Logic
   heading colour) so sections are easy to find while scrolling. Turn it on by adding class
   "st-sections" to the form (or page wrapper). First used on Business Settings (collateral.php), 18 Nov 2026. */
#main.st-main .st-sections .st-cardtitle {
  color: cornflowerblue !important;
}

/* ============================================================================
   EVIDENCE OF PAYMENT FIELD + WEBCAM BOX (shared) — added 23 Nov 2026
   First used on mandate_consumer.php (Purchase Mandate charges paid from a bank).
   Same look as the evidence field and webcam box on direct_repay.php / Direct Deposits
   (those pages still carry their own dr- / dd- copies for now).
   Markup:  .st-evi > .st-evi-box (.st-evi-text, .st-evi-change, .st-evi-chev) + .st-evi-menu (.st-evi-item x2) + input.st-evi-file
            webcam: .st-modal.st-cam > .st-cam-stage (.st-cam-wait, .st-cam-err, video, img)
   ============================================================================ */
.st-evi{position:relative}
.st-evi-box{height:34px;border:1px solid #d1d5db;border-radius:6px;padding:0 10px;display:flex;align-items:center;gap:7px;box-sizing:border-box;
  font-size:13px;font-family:sans-serif;color:#9ca3af;background:#fff;cursor:pointer;user-select:none}
.st-evi-box:focus,.st-evi.st-open .st-evi-box{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.15)}
.st-evi-box svg{flex:none;width:14px;height:14px;stroke:#9ca3af !important;fill:none !important}
.st-evi-text{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-evi.st-has .st-evi-box{color:#111827}
.st-evi-change{display:none;flex:none;color:#1976d2}
.st-evi.st-has .st-evi-change{display:inline}
.st-evi.st-has .st-evi-chev{display:none}
.st-evi-menu{display:none;position:absolute;top:100%;left:0;right:0;margin-top:4px;background:#fff;border:1px solid #e0e0e0;border-radius:15px;
  padding:8px 0;box-shadow:0 4px 12px rgba(0,0,0,.1);z-index:100001}
.st-evi-menu.st-show{display:block}
.st-evi-item{display:flex;align-items:center;gap:8px;padding:10px 16px;margin:0 6px;border-radius:10px;font-size:12px;color:#000;
  font-family:sans-serif;cursor:pointer;white-space:nowrap;user-select:none}
.st-evi-item:hover{background:#e8f4fd;color:#1976d2}
.st-evi-item svg{flex:none;width:15px;height:15px;stroke:currentColor;stroke-width:1.5;fill:none}
.st-evi-file{position:absolute;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none}
/* the two-item menu must not be cut off by the modal it sits in while it is open */
.st-modal.st-evi-open,.st-modal.st-evi-open .st-modal-body{overflow:visible !important}

/* webcam box */
.st-modal.st-cam{width:440px;max-width:94vw}
.st-cam-stage{position:relative;height:300px;border-radius:8px;background:#111827;overflow:hidden;display:flex;align-items:center;justify-content:center}
.st-cam-stage video,.st-cam-stage img{display:block;width:100%;height:100%;object-fit:contain}
.st-cam-wait{display:flex;align-items:center;gap:10px;color:#d1d5db;font-size:12px}
.st-cam-wait .st-spinner{border-color:rgba(255,255,255,.25);border-top-color:#fff}
.st-cam-err{padding:0 24px;text-align:center;color:#e5e7eb;font-size:12px;line-height:1.5}

/* ============================================================================
   EVIDENCE NOTE + BATCH FILES (24-25 Nov 2026) — evidence_batch.js
   On payer.php, Direct Deposits, direct_repay.php, Service Billing (batch files),
   journal.php and payer_voucher.php (the amber "used before" note only)
   eb-bad = refused (red), eb-warn = used before but allowed (amber, third-party payments)
   ============================================================================ */
/* the note under an evidence field: what the file is, or why it can't be used */
.st-page .eb-note{font-size:12px;line-height:1.5;color:#6b7280;font-family:sans-serif;margin-top:6px}
.st-page .eb-note.eb-bad{color:#b91c1c}
.st-page .eb-note.eb-warn{color:#b45309}
.st-page .eb-note .eb-red,.st-modal .eb-red{display:block;color:#b91c1c}
.st-page a.eb-link,.st-modal a.eb-link{color:#1976d2 !important;text-decoration:none !important;font-weight:normal;white-space:nowrap;cursor:pointer}
.st-page a.eb-link:hover{text-decoration:underline !important}

/* Existing evidence: the batch files to pick from */
.st-page .eb-list{border:1px solid #d9d9d9;border-radius:6px;background:#fff;overflow:hidden;font-family:sans-serif;font-size:12px}
.st-page .eb-lhead,.st-page .eb-row{display:grid;grid-template-columns:16px minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) 34px;gap:8px;align-items:center;padding:0 10px}
.st-page .eb-lhead{height:26px;color:#9ca3af;font-size:11px;border-bottom:1px solid #eef0f2}
.st-page .eb-lhead span:nth-child(n+3),.st-page .eb-row span:nth-child(n+3){text-align:right}
#main.st-main .st-page label.eb-row{height:32px;margin:0 !important;padding:0 10px !important;border-top:1px solid #f3f4f6;color:#374151 !important;font-weight:normal !important;font-size:12px !important;cursor:pointer}
#main.st-main .st-page label.eb-row:first-of-type{border-top:0}
#main.st-main .st-page label.eb-row:hover{background:#f9fafb}
#main.st-main .st-page label.eb-row.eb-picked{background:#e8f4fd;color:#1565c0 !important}
#main.st-main .st-page label.eb-row.eb-off{color:#9ca3af !important;cursor:default;background:#fff}
#main.st-main .st-page .eb-row input{margin:0 !important;width:13px;height:13px;accent-color:#1565c0}
.st-page .eb-row span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-page .eb-row .eb-left{color:#111827}
.st-page .eb-row.eb-off .eb-left{color:#9ca3af}
.st-page a.eb-view{color:#1976d2 !important;text-decoration:none !important;text-align:right;font-weight:normal}
.st-page a.eb-view:hover{text-decoration:underline !important}
.st-page .eb-list-empty{font-size:12px;line-height:1.5;color:#6b7280;font-family:sans-serif;padding:8px 0}
.eb-list-wait{display:flex;align-items:center;justify-content:center;min-height:40px}
.eb-list-wait .st-spinner{width:16px;height:16px}

/* the "Mark as batch" / "Correct the total" box */
.eb-modal .st-panel-card{border:none;border-radius:0;overflow:visible;margin-bottom:6px}
.eb-modal .st-panel-row{padding:9px 0;border-top:1px solid #f3f4f6}
.eb-modal .eb-mfield{margin-top:12px}
.eb-modal .eb-mfield input[type="text"],.eb-modal .eb-mfield textarea{display:block;width:100% !important;box-sizing:border-box !important;border:1px solid #d9d9d9 !important;border-radius:6px !important;background:#fff !important;box-shadow:none !important;font-family:sans-serif !important;font-size:13px !important;color:#111827 !important;padding:6px 10px !important;margin:0 !important}
.eb-modal .eb-mfield input[type="text"]{height:30px !important}
.eb-modal .eb-mfield textarea{resize:vertical;min-height:52px}
.eb-modal .eb-mfield input:focus,.eb-modal .eb-mfield textarea:focus{outline:none;border-color:var(--st-blue) !important;box-shadow:0 0 0 3px rgba(59,130,246,.15) !important}
.eb-modal .eb-fixed{font-size:13px;color:#374151;font-family:sans-serif;padding:6px 0}
.eb-modal .eb-fixed b{font-weight:500;color:#111827}
.eb-modal .eb-merr{font-size:12px;color:#b91c1c;margin-top:8px;min-height:0}
.eb-modal .eb-merr:empty{display:none}

/* the approver's view of a batch file (pending_approvals.php) */
.ap-ebbox{margin-top:8px;border:1px solid #eef0f2;border-radius:6px;max-height:170px;overflow:auto}
.ap-ebrow{display:flex;justify-content:space-between;gap:12px;padding:6px 10px;border-top:1px solid #f3f4f6;font-size:12px;line-height:1.45}
.ap-ebrow:first-child{border-top:0}
.ap-ebrow > span:first-child{color:#374151;min-width:0}
.ap-ebrow > span:last-child{text-align:right;flex:none;color:#111827}
.ap-ebrow .ap-ebsub{display:block;color:#9ca3af;font-size:11px}
.ap-ebcap{font-size:12px;color:#6b7280;margin-top:12px}