
/* Item 326 fallback: a layout viewport that stays below 1470px (a narrow
   desktop window, or device emulation that ignores the viewport meta) draws
   the desktop layout at 1470px and scales it. --cw-vw/vh expand viewport
   units into that layout so dialogs and fixed bars match the desktop. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  --cw-admin-scale: 1;
  --cw-vw: 1vw;
  --cw-vh: 1vh;
  --cw-dvw: 1dvw;
  --cw-dvh: 1dvh;
  --cw-svw: 1svw;
  --cw-svh: 1svh;
  --cw-lvw: 1lvw;
  --cw-lvh: 1lvh;
}
html.cw-desktop-scale {
  --cw-vw: calc(1vw / var(--cw-admin-scale));
  --cw-vh: calc(1vh / var(--cw-admin-scale));
  --cw-dvw: calc(1dvw / var(--cw-admin-scale));
  --cw-dvh: calc(1dvh / var(--cw-admin-scale));
  --cw-svw: calc(1svw / var(--cw-admin-scale));
  --cw-svh: calc(1svh / var(--cw-admin-scale));
  --cw-lvw: calc(1lvw / var(--cw-admin-scale));
  --cw-lvh: calc(1lvh / var(--cw-admin-scale));
}
html.cw-desktop-scale-zoom {
  width: 1470px;
  min-width: 1470px;
  min-height: calc(100 * var(--cw-vh));
  zoom: var(--cw-admin-scale);
}
html.cw-desktop-scale-zoom body {
  width: 1470px;
  min-width: 1470px;
  min-height: calc(100 * var(--cw-vh));
}
html.admin-desktop-scale,
html.cw-desktop-scale-zoom {
  overflow-x: clip;
}
:root {
  color-scheme: light;
  --admin-navy: #061e35;
  --admin-navy-deep: #03172a;
  --admin-teal: #078b80;
  --admin-teal-bright: #18c9bc;
  --admin-ice: #eef8f7;
  --admin-canvas: #f3f7f8;
  --admin-paper: #ffffff;
  --admin-ink: #0e2440;
  --admin-muted: #647488;
  --admin-line: #d7e1e6;
  --admin-line-dark: #c4d0d8;
  --admin-danger: #a63b35;
  --admin-danger-bg: #fce9e7;
  --admin-warning: #865900;
  --admin-warning-bg: #fff2ca;
  --admin-success: #167047;
  --admin-success-bg: #e0f3e8;
  --admin-info: #275f9f;
  --admin-info-bg: #e7effa;
  --admin-shadow: 0 18px 45px rgba(3, 23, 42, .12);
}

/* Loan operations workspaces */
.admin-nav-group {
  margin: 1.1rem 0 .35rem;
  padding: 0 .85rem;
  color: rgba(223, 238, 248, .58);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .14em;
}

.admin-nav-group:first-child { margin-top: .25rem; }

.admin-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  min-width: max-content;
}

.admin-operational-summary {
  margin-bottom: 1.2rem;
}

.admin-operational-card strong {
  color: var(--admin-navy, #082844);
  font-size: clamp(1.15rem, calc(2 * var(--cw-vw)), 1.55rem);
}

.admin-operations-table { min-width: 960px; }
.admin-operations-table td { vertical-align: top; }
.admin-template-preview { max-width: 28rem; white-space: normal; line-height: 1.5; }

/* Item 62: single-language SMS template governance */
.admin-template-policy {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 0 0 1rem;
  padding: .9rem 1rem;
  border: 1px solid #b9ddd8;
  border-radius: .85rem;
  color: #174f4a;
  background: #edf9f7;
}

.admin-template-policy strong { color: #0b3f3b; }
.admin-template-policy span { color: #496c69; font-size: .86rem; }

.admin-template-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: .6rem;
}

.admin-template-identity strong { color: var(--admin-ink); font-size: .88rem; }

.admin-template-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: .25rem .62rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.2;
}

.admin-template-type-system-automatic { border-color: #a7d8d2; color: #075b53; background: #e4f6f3; }
.admin-template-type-manual { border-color: #bcd1eb; color: #24588e; background: #eaf2fb; }
.admin-template-type-archived { border-color: #d3d9de; color: #596775; background: #eef2f5; }

.admin-template-archived {
  display: grid;
  gap: .3rem;
  padding: .9rem 1rem;
  border: 1px solid #d6dde2;
  border-radius: .75rem;
  color: #596775;
  background: #f6f8f9;
}

.admin-template-rule-card {
  padding: 1rem;
  border: 1px solid #c9dedb;
  border-radius: .85rem;
  background: #f5fbfa;
}

.admin-template-rule-card h3 { margin: 0 0 .8rem; color: #0a3e3a; font-size: 1rem; }
.admin-template-rule-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 0; }
.admin-template-rule-card dl > div { min-width: 0; padding: .7rem; border-radius: .6rem; background: #fff; }
.admin-template-rule-card dt { color: var(--admin-muted); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.admin-template-rule-card dd { margin: .25rem 0 0; color: var(--admin-ink); font-size: .86rem; font-weight: 700; overflow-wrap: anywhere; }
.admin-template-rule-card > p { margin: .8rem 0 0; color: #59716f; font-size: .78rem; }
.admin-template-rule-summary { max-width: 17rem; color: #52687a; font-size: .82rem; line-height: 1.45; }

.admin-template-dialog-body { display: grid; gap: 1rem; }
.admin-template-dialog-body > p { margin: 0; }
.admin-template-dialog-body .admin-checkbox-field { min-height: auto; padding-top: 0; }
.admin-template-dialog-body .admin-template-preview {
  display: grid;
  max-width: none;
  gap: .55rem;
  padding: 1rem;
  border: 1px solid #d9e4e7;
  border-radius: .85rem;
  background: #f8fbfc;
}

.admin-template-dialog-body .admin-template-preview > div { display: flex; justify-content: space-between; gap: 1rem; }
.admin-template-dialog-body .admin-template-preview small { color: var(--admin-muted); }
.admin-template-dialog-body .admin-template-preview p,
.admin-template-history-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-template-test-status { min-height: 1.3em; margin: 0; color: var(--admin-success); font-size: .84rem; font-weight: 700; }
.admin-template-dialog-actions { flex-wrap: wrap; }
.admin-template-dialog-actions .admin-button-danger { margin-right: auto; }
.admin-template-history-table { min-width: 760px; }

@media (max-width: 640px) {
  :where(html:not(.cw-desktop-scale)) .admin-template-policy{ align-items: flex-start; flex-direction: column; }
  :where(html:not(.cw-desktop-scale)) .admin-template-rule-card dl{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-template-dialog-body .admin-template-preview > div{ align-items: flex-start; flex-direction: column; gap: .25rem; }
  :where(html:not(.cw-desktop-scale)) .admin-template-dialog-actions{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :where(html:not(.cw-desktop-scale)) .admin-template-dialog-actions .admin-button{ width: 100%; min-height: 44px; }
  :where(html:not(.cw-desktop-scale)) .admin-template-dialog-actions .admin-button-danger{ margin-right: 0; }
}

/* Item 134: scoped client/application SMS history. */
.admin-sms-history-body{display:grid;gap:14px;min-width:0}
.admin-sms-history-list{display:grid;gap:12px;min-width:0}
.admin-sms-history-card{display:grid;gap:12px;min-width:0;padding:16px;border:1px solid var(--admin-border,#d8dee8);border-radius:14px;background:#fff}
.admin-sms-history-card-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.admin-sms-history-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 18px;margin:0}
.admin-sms-history-facts>div{display:grid;align-content:start;gap:4px;min-width:0}
.admin-sms-history-facts dt{color:var(--admin-muted,#596579);font-size:12px;font-weight:750}
.admin-sms-history-facts dd{min-width:0;margin:0;overflow-wrap:anywhere;font-weight:650}
.admin-sms-history-message{min-width:0}
.admin-sms-history-message p{white-space:pre-wrap;overflow-wrap:anywhere}
.admin-sms-history-pagination{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}
@media(max-width:900px){:where(html:not(.cw-desktop-scale)) .admin-sms-history-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){:where(html:not(.cw-desktop-scale)) .admin-sms-history-card{padding:13px}:where(html:not(.cw-desktop-scale)) .admin-sms-history-facts{grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-sms-history-pagination .admin-button{flex:1 1 120px}}
.admin-ledger-line { margin: 0; padding: .72rem 0; border-bottom: 1px solid #e4ebf0; color: #40566a; }
.admin-ledger-line:last-child { border-bottom: 0; }
.admin-extension-history-line { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .85rem; row-gap: .28rem; }
.admin-extension-history-line > .admin-extension-history-note { flex-basis: 100%; }
.admin-ledger-line-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.admin-checkbox-field {
  display: flex;
  flex-direction: row !important;
  align-items: center;
  gap: .65rem;
  min-height: 3.25rem;
  padding-top: 1.45rem;
}

.admin-checkbox-field input { width: 1.1rem; height: 1.1rem; accent-color: #008b80; }
.admin-danger-note { border-color: #efc8cc; background: #fff7f7; color: #7e2630; }

.admin-status-bad_debt,
.admin-status-written_off { color: #8b2731; background: #fdebed; border-color: #f4c9cd; }
.admin-status-partially_written_off,
.admin-status-overdue { color: #8a4c06; background: #fff3db; border-color: #efd7a5; }
.admin-status-settled,
.admin-status-performing,
.admin-status-delivered,
.admin-status-payment_received,
.admin-status-loan_settled { color: #14654f; background: #e7f6f0; border-color: #b9e3d5; }
.admin-status-reversal,
.admin-status-cancelled { color: #596775; background: #eef2f5; border-color: #d5dde4; }

.admin-notification-menu { position: relative; }
.admin-notification-bell { position: relative; }
.admin-notification-count {
  position: absolute;
  top: -.25rem;
  right: -.25rem;
  display: grid;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 .28rem;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #d63e4d;
  font-size: .65rem;
  font-weight: 800;
}

.admin-notification-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + .75rem);
  right: 0;
  width: min(25rem, calc(calc(100 * var(--cw-vw)) - 2rem));
  max-height: min(38rem, calc(calc(100 * var(--cw-vh)) - 7rem));
  overflow: auto;
  border: 1px solid #d8e2e9;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 24px 64px rgba(5, 31, 52, .2);
}

.admin-notification-panel > header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e5ebef;
  background: rgba(255, 255, 255, .97);
}
.admin-notification-panel h2 { margin: 0; color: #092842; font-size: 1rem; }
.admin-notification-panel header p { margin: .2rem 0 0; color: #687b8b; font-size: .78rem; }
.admin-notification-list { margin: 0; padding: 0; list-style: none; }
.admin-notification-item { border-bottom: 1px solid #edf1f4; }
.admin-notification-item > button {
  display: grid;
  grid-template-columns: .65rem 1fr;
  gap: .8rem;
  width: 100%;
  padding: .9rem 1.1rem;
  border: 0;
  color: inherit;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.admin-notification-item > button:hover,
.admin-notification-item > button:focus-visible { background: #f2faf9; outline: none; }
.admin-notification-unread > button { background: #f3fbfa; }
.admin-notification-type { width: .6rem; height: .6rem; margin-top: .35rem; border-radius: 50%; background: #8293a1; }
.admin-notification-unread .admin-notification-type { background: #008b80; box-shadow: 0 0 0 4px rgba(0, 139, 128, .11); }
.admin-notification-item strong { color: #102f48; font-size: .86rem; }
.admin-notification-item small { color: #526b7d; line-height: 1.4; }
.admin-notification-item time { color: #82919c; font-size: .72rem; }
.admin-notification-empty { margin: 0; padding: 2rem 1.1rem; color: #657a8b; text-align: center; }

@media (max-width: 840px) {
  :where(html:not(.cw-desktop-scale)) .admin-operational-summary{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :where(html:not(.cw-desktop-scale)) .admin-notification-panel{ position: fixed; top: 4.8rem; right: 1rem; }
}

@media (max-width: 520px) {
  :where(html:not(.cw-desktop-scale)) .admin-operational-summary{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-table-actions{ min-width: 0; }
  :where(html:not(.cw-desktop-scale)) .admin-table-actions .admin-button{ flex: 1 1 auto; }
}

/* Item 326: phones and tablets lock the layout viewport to 1470px.
   When that lock is ignored, html.cw-desktop-scale draws the same 1470px
   layout and scales it, and max-width rules below 1470 are gated off.
   Rules that still match at 1470, including max-width:1500px, are the
   reference MacBook layout. Admin CSS has no pointer, hover or user-agent
   queries that change layout. */
html.admin-desktop-scale { min-width: 1470px; }

.admin-body {
  min-width: 320px;
  min-height: calc(100 * var(--cw-vh));
  margin: 0;
  color: var(--admin-ink);
  background: var(--admin-canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
}

#adminApp *,
#adminApp *::before,
#adminApp *::after { box-sizing: border-box; }

#adminApp button,
#adminApp input,
#adminApp select,
#adminApp textarea { font: inherit; }

#adminApp button,
#adminApp a,
#adminApp input,
#adminApp select,
#adminApp textarea { -webkit-tap-highlight-color: transparent; }

#adminApp button { cursor: pointer; }
#adminApp button:disabled { cursor: not-allowed; opacity: .55; }
#adminApp h1,
#adminApp h2,
#adminApp h3,
#adminApp p { margin-top: 0; }

#adminApp :focus-visible {
  outline: 3px solid rgba(24, 201, 188, .45);
  outline-offset: 2px;
}

.admin-hidden { display: none !important; }
#adminApp [hidden] { display: none !important; }
.admin-app { min-height: calc(100 * var(--cw-vh)); }

.admin-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.admin-initial-loading {
  display: grid;
  min-height: calc(100 * var(--cw-vh));
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--admin-muted);
  background: var(--admin-paper);
}

.admin-initial-loading p,
.admin-table-loading p,
.admin-detail-loading p { margin: 0; }

.admin-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid #d3e5e4;
  border-top-color: var(--admin-teal);
  border-radius: 50%;
  animation: admin-spin .75s linear infinite;
}

@keyframes admin-spin { to { transform: rotate(360deg); } }

.admin-brand {
  display: inline-flex;
  align-items: center;
  color: var(--admin-navy);
  font-size: 29px;
  font-weight: 850;
  letter-spacing: -.055em;
  text-decoration: none;
}

.admin-brand-word > span { color: var(--admin-teal-bright); }
.admin-brand-inverse { color: var(--admin-paper); }
.admin-brand-tag,
.admin-sidebar-label {
  color: #78899b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
}

.admin-eyebrow {
  display: block;
  color: var(--admin-teal);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
}

.admin-eyebrow-light { color: var(--admin-teal-bright); }

.admin-auth-view {
  display: grid;
  min-height: calc(100 * var(--cw-vh));
  background: var(--admin-paper);
  grid-template-columns: minmax(420px, .84fr) minmax(520px, 1.16fr);
}

.admin-auth-panel {
  display: flex;
  width: min(100%, 590px);
  min-height: calc(100 * var(--cw-vh));
  margin: 0 auto;
  padding: clamp(34px, calc(6 * var(--cw-vw)), 76px);
  flex-direction: column;
  justify-content: center;
}

.admin-auth-brand {
  position: absolute;
  top: 34px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-auth-brand .admin-brand-tag {
  padding-left: 16px;
  border-left: 1px solid var(--admin-line);
}

.admin-language-control {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.admin-language-select {
  min-width: 126px;
  min-height: 36px;
  padding: 0 32px 0 11px;
  color: #33485f;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  outline: 0;
  background-color: var(--admin-paper);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.admin-language-select:hover {
  color: var(--admin-teal);
  border-color: #a9ccc9;
  background-color: var(--admin-ice);
}

.admin-language-select:focus-visible {
  border-color: var(--admin-teal);
  box-shadow: 0 0 0 3px rgba(7, 139, 128, .13);
}

.admin-auth-copy { margin-bottom: 28px; }
.admin-auth-copy h1 {
  margin: 10px 0 12px;
  font-size: clamp(31px, calc(4 * var(--cw-vw)), 42px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.admin-auth-copy p {
  max-width: 460px;
  margin-bottom: 0;
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.65;
}

.admin-auth-form { display: grid; gap: 18px; }
.admin-field { display: grid; gap: 7px; }
.admin-field > span {
  color: #33485f;
  font-size: 12px;
  font-weight: 750;
}

.admin-field > span small {
  margin-left: 4px;
  color: var(--admin-muted);
  font-size: 10px;
  font-weight: 650;
}

.admin-field > small {
  color: var(--admin-muted);
  font-size: 11px;
  line-height: 1.5;
}

.admin-field input,
.admin-field select,
.admin-field textarea,
.admin-search-field input,
.admin-filter-field select {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  color: var(--admin-ink);
  border: 1px solid var(--admin-line-dark);
  border-radius: 9px;
  outline: 0;
  background: var(--admin-paper);
  transition: border-color .15s, box-shadow .15s;
}

.admin-field textarea {
  min-height: 108px;
  padding-top: 11px;
  resize: vertical;
  line-height: 1.5;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus,
.admin-search-field input:focus,
.admin-filter-field select:focus {
  border-color: var(--admin-teal);
  box-shadow: 0 0 0 3px rgba(7, 139, 128, .13);
}

.admin-field input::placeholder,
.admin-field textarea::placeholder,
.admin-search-field input::placeholder { color: #93a1ad; }

.admin-date-choice-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.admin-date-choice {
  min-height: 36px;
  padding: 6px 9px;
  color: #40566c;
  border: 1px solid var(--admin-line-dark);
  border-radius: 8px;
  background: #f7f9fa;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  transition: border-color .15s, box-shadow .15s, color .15s, background .15s;
}

.admin-date-choice:hover { border-color: #6baea8; }
.admin-date-choice:focus-visible {
  outline: 0;
  border-color: var(--admin-teal);
  box-shadow: 0 0 0 3px rgba(7, 139, 128, .13);
}
.admin-date-choice[aria-pressed="true"] {
  color: #006a61;
  border-color: #78c1ba;
  background: var(--admin-ice);
}

.admin-password-field { position: relative; display: block; }
.admin-password-field input { padding-right: 82px; }
.admin-password-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 66px;
  min-height: 40px;
  padding: 0 10px;
  color: var(--admin-teal);
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.admin-password-toggle:hover { background: var(--admin-ice); }
.admin-form-error {
  min-height: 18px;
  margin: -4px 0 0;
  color: var(--admin-danger);
  font-size: 12px;
  line-height: 1.45;
}

.admin-disbursement-reason {
  display: block;
  margin: 4px 0 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-button {
  display: inline-flex;
  min-height: 44px;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}

.admin-button-primary {
  color: var(--admin-paper);
  border: 1px solid var(--admin-teal);
  background: var(--admin-teal);
}

.admin-button-primary:hover:not(:disabled) {
  border-color: #05766e;
  background: #05766e;
  box-shadow: 0 9px 20px rgba(5, 118, 110, .2);
  transform: translateY(-1px);
}

.admin-button-secondary {
  color: var(--admin-ink);
  border: 1px solid var(--admin-line-dark);
  background: var(--admin-paper);
}

.admin-button-secondary:hover:not(:disabled) { border-color: var(--admin-teal); background: var(--admin-ice); }
.admin-button-danger { color: white; border: 1px solid var(--admin-danger); background: var(--admin-danger); }
.admin-button-danger:hover:not(:disabled) { background: #8e302b; }
.admin-button-danger-outline { color: var(--admin-danger); border: 1px solid #d89b97; background: var(--admin-paper); }
.admin-button-danger-outline:hover:not(:disabled) { border-color: var(--admin-danger); background: var(--admin-danger-bg); }
.admin-button-full { width: 100%; min-height: 50px; }

.admin-link-button {
  min-height: 36px;
  padding: 0;
  color: var(--admin-teal);
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.admin-link-button:hover { color: #045f59; text-decoration: underline; }
.admin-auth-notice {
  display: flex;
  margin: 25px 0 0;
  align-items: flex-start;
  gap: 8px;
  color: var(--admin-muted);
  font-size: 11px;
  line-height: 1.5;
}

.admin-auth-logout { margin: 18px auto 0; }
.admin-auth-aside {
  position: relative;
  display: flex;
  min-height: calc(100 * var(--cw-vh));
  padding: clamp(60px, calc(8 * var(--cw-vw)), 120px);
  align-items: flex-end;
  overflow: hidden;
  color: var(--admin-paper);
  background:
    radial-gradient(circle at 74% 20%, rgba(24, 201, 188, .18), transparent 30%),
    linear-gradient(140deg, var(--admin-navy) 0%, var(--admin-navy-deep) 100%);
}

.admin-auth-pattern {
  position: absolute;
  top: -80px;
  right: -90px;
  width: 580px;
  height: 580px;
  opacity: .4;
  background-image:
    linear-gradient(rgba(24, 201, 188, .21) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 201, 188, .21) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle, black, transparent 67%);
}

.admin-auth-pattern::after {
  position: absolute;
  top: 270px;
  left: 202px;
  width: 54px;
  height: 54px;
  content: "";
  background: rgba(24, 201, 188, .6);
  box-shadow: 54px 54px 0 rgba(24, 201, 188, .35), -54px 108px 0 rgba(24, 201, 188, .24);
}

.admin-auth-aside-copy { position: relative; z-index: 1; max-width: 670px; }
.admin-auth-aside-copy h2 {
  margin: 14px 0 20px;
  font-size: clamp(38px, calc(5 * var(--cw-vw)), 65px);
  line-height: 1.02;
  letter-spacing: -.055em;
}

.admin-auth-aside-copy p {
  max-width: 570px;
  margin-bottom: 0;
  color: #a9bbc9;
  font-size: 16px;
  line-height: 1.65;
}

.admin-portal { min-height: calc(100 * var(--cw-vh)); }
.admin-sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  display: flex;
  width: 252px;
  padding: 28px 18px 22px;
  flex-direction: column;
  color: white;
  background: linear-gradient(180deg, var(--admin-navy) 0%, var(--admin-navy-deep) 100%);
}

.admin-sidebar-header { display: grid; gap: 9px; padding: 0 12px 27px; }
.admin-sidebar-label { color: #7891a4; }
.admin-nav { display: grid; min-height: 0; overflow-y: auto; gap: 5px; scrollbar-width: thin; }
.admin-nav-link,
.admin-sidebar-action {
  display: flex;
  min-height: 48px;
  padding: 0 13px;
  align-items: center;
  gap: 12px;
  color: #a8bac8;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.admin-nav-link { width: 100%; }
.admin-nav-badge {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  margin-left: auto;
  padding: 0 6px;
  place-items: center;
  color: #052038;
  border-radius: 99px;
  background: var(--admin-teal-bright);
  font-size: 9px;
  font-weight: 900;
  box-shadow: 0 0 0 3px rgba(24, 201, 188, .12);
}

.admin-nav-link svg,
.admin-sidebar-action svg,
.admin-icon-button svg,
.admin-search-field svg,
.admin-summary-icon svg,
.admin-empty-icon svg,
.admin-dialog-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-nav-link-active,
.admin-nav-link:hover,
.admin-sidebar-action:hover { color: white; background: rgba(255, 255, 255, .09); }
.admin-nav-link-active { box-shadow: inset 3px 0 var(--admin-teal-bright); }
.admin-sidebar-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.admin-user-card { display: flex; padding: 7px 11px 13px; align-items: center; gap: 10px; }
.admin-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  place-items: center;
  color: var(--admin-navy);
  border-radius: 50%;
  background: var(--admin-teal-bright);
  font-size: 12px;
  font-weight: 850;
}

.admin-user-copy { display: grid; min-width: 0; gap: 2px; }
.admin-user-copy strong { overflow: hidden; color: white; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-copy small { color: #7993a6; font-size: 9px; }
.admin-sidebar-action { width: 100%; }

.admin-main { min-height: calc(100 * var(--cw-vh)); margin-left: 252px; }
.admin-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 82px;
  padding: 16px clamp(24px, calc(4 * var(--cw-vw)), 54px);
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--admin-line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
}

.admin-topbar-copy h1 { margin: 5px 0 0; font-size: 22px; letter-spacing: -.03em; }
.admin-topbar-actions { display: flex; margin-left: auto; align-items: center; gap: 12px; }
.admin-language-control-topbar .admin-language-select { min-height: 32px; }
.admin-environment-badge {
  display: inline-flex;
  min-height: 30px;
  padding: 0 10px;
  align-items: center;
  gap: 7px;
  color: #3f566d;
  border: 1px solid var(--admin-line);
  border-radius: 99px;
  background: white;
  font-size: 10px;
  font-weight: 750;
}

.admin-environment-badge > span { width: 7px; height: 7px; border-radius: 50%; background: var(--admin-success); }
.admin-icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  color: #40556b;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  background: white;
}

.admin-icon-button:hover { color: var(--admin-teal); border-color: #a9ccc9; background: var(--admin-ice); }
.admin-mobile-menu { display: none; }
.admin-content { width: min(1500px, 100%); margin: 0 auto; padding: 36px clamp(24px, calc(4 * var(--cw-vw)), 54px) 64px; }
.admin-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.admin-section-heading h2 { margin-bottom: 7px; font-size: 25px; letter-spacing: -.035em; }
.admin-section-heading p { margin-bottom: 0; color: var(--admin-muted); font-size: 12px; line-height: 1.5; }
.admin-last-updated { flex: 0 0 auto; }
.admin-section-heading + .admin-list-card,
.admin-hierarchy-panel + .admin-list-card { margin-top: 24px; }
.admin-scope-badge {
  display: inline-flex;
  min-height: 29px;
  padding: 0 10px;
  align-items: center;
  color: #236373;
  border: 1px solid #bfdae0;
  border-radius: 99px;
  background: #edf8fa;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .03em;
  white-space: nowrap;
}
.admin-scope-note {
  display: flex;
  margin: 20px 0 16px;
  padding: 12px 14px;
  align-items: center;
  gap: 10px;
  color: #405b6f;
  border: 1px solid #cddde3;
  border-radius: 10px;
  background: #f4fafb;
}
.admin-scope-note > span {
  display: grid;
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: #34788a;
  font-size: 10px;
  font-weight: 900;
}
.admin-scope-note p { margin: 0; font-size: 10px; line-height: 1.5; }
.admin-permission-note { align-items: flex-start; }

.admin-hierarchy-panel {
  display: grid;
  margin-top: 20px;
  padding: 15px 18px;
  border: 1px solid var(--admin-line);
  border-radius: 11px;
  background: white;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  box-shadow: 0 5px 18px rgba(3, 23, 42, .035);
}
.admin-hierarchy-panel > div + div { padding-left: 20px; border-left: 1px solid var(--admin-line); }
.admin-hierarchy-panel strong { display: block; margin-bottom: 4px; color: var(--admin-ink); font-size: 11px; }
.admin-hierarchy-panel p { margin: 0; color: var(--admin-muted); font-size: 10px; line-height: 1.55; }

.admin-test-global-warning {
  display: flex;
  margin: 24px 0 16px;
  padding: 16px 18px;
  align-items: flex-start;
  gap: 13px;
  color: #694400;
  border: 1px solid #e5c16e;
  border-radius: 12px;
  background: #fff7df;
}

.admin-test-global-warning > span {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: #a66a00;
  font-weight: 900;
}

.admin-test-global-warning strong { display: block; margin-bottom: 4px; font-size: 12px; }
.admin-test-global-warning p { margin: 0; font-size: 11px; line-height: 1.55; }
.admin-test-settings-loading {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--admin-muted);
  font-size: 11px;
}

.admin-test-settings-loading p { margin: 0; }
.admin-test-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.admin-fpg-reconciliation-region { min-height: 210px; margin-top: 14px; border: 1px solid var(--admin-line); border-radius: 10px; }
.admin-fpg-reconciliation-table { min-width: 1040px; }
.admin-fpg-reconciliation-action { display: grid; min-width: 210px; gap: 7px; }
.admin-fpg-reconciliation-action input { width: 100%; min-height: 42px; }
.admin-fpg-reconciliation-action .admin-button { width: 100%; }
.admin-fpg-reconciliation-row-error { margin: 0; color: var(--admin-danger); font-size: 11px; line-height: 1.4; }
.admin-fpg-reconciliation-table .admin-status-due,
.admin-fpg-reconciliation-table .admin-status-provider_pending,
.admin-fpg-reconciliation-table .admin-status-retryable_error { color: #8a5700; background: #fff3d6; }
.admin-fpg-reconciliation-table .admin-status-checking { color: #315f8c; background: #eaf2fb; }
.admin-fpg-reconciliation-table .admin-status-verified_success { color: #066c61; background: #e3f6f2; }
.admin-fpg-reconciliation-table .admin-status-needs_review { color: var(--admin-danger); background: var(--admin-danger-bg); }
.admin-test-setting-card {
  display: flex;
  min-width: 0;
  min-height: 260px;
  padding: 20px;
  flex-direction: column;
  border: 1px solid var(--admin-line);
  border-radius: 13px;
  background: white;
  box-shadow: 0 8px 25px rgba(3, 23, 42, .05);
}

.admin-test-setting-danger { border-top: 3px solid #d59a31; }
.admin-test-setting-heading { display: grid; align-items: center; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; }
.admin-test-setting-heading h3 { margin: 4px 0 0; font-size: 14px; line-height: 1.25; }
.admin-test-setting-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--admin-teal);
  border-radius: 10px;
  background: var(--admin-ice);
}

.admin-test-setting-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-test-setting-card > p { margin: 18px 0 14px; color: var(--admin-muted); font-size: 11px; line-height: 1.6; }
/* Keep a 44px hit target without stretching the visible switch track. */
.admin-setting-switch {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.admin-setting-switch::before {
  content: "";
  position: absolute;
  box-sizing: border-box;
  top: 8px;
  left: 0;
  width: 48px;
  height: 28px;
  border: 1px solid #acbbc4;
  border-radius: 99px;
  background: #dce4e8;
  transition: background .15s, border-color .15s;
}
.admin-setting-switch > span:first-child {
  position: absolute;
  top: 12px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgba(3, 23, 42, .25);
  transition: transform .15s;
}
.admin-setting-switch-on::before { border-color: var(--admin-teal); background: var(--admin-teal); }
.admin-setting-switch-on > span:first-child { transform: translateX(20px); }
.admin-setting-switch:focus-visible { outline: 3px solid var(--admin-teal); outline-offset: 3px; border-radius: 8px; }
.admin-setting-status {
  margin-top: auto;
  padding: 10px 11px;
  color: #435b70;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #f7fafb;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.45;
}

.admin-setting-status-warning { color: #744900; border-color: #ead090; background: #fff7df; }
.admin-setting-status-ready { color: var(--admin-success); border-color: #b8d9c5; background: var(--admin-success-bg); }
.admin-setting-meta { display: block; min-height: 28px; padding-top: 10px; color: var(--admin-muted); font-size: 8px; line-height: 1.4; }
.admin-read-only-notice {
  margin: 16px 0 0;
  padding: 13px 15px;
  color: #40566c;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  background: white;
  font-size: 10px;
  line-height: 1.5;
}

.admin-loan-settings-error { margin: 24px 0 0; }
.admin-loan-settings-content { margin-top: 24px; }
.admin-loan-setting-card {
  width: min(820px, 100%);
  padding: clamp(22px, calc(3 * var(--cw-vw)), 30px);
  border: 1px solid var(--admin-line);
  border-top: 3px solid var(--admin-teal);
  border-radius: 14px;
  background: white;
  box-shadow: 0 8px 25px rgba(3, 23, 42, .05);
}
.admin-loan-setting-card-is-disabled { border-top-color: var(--admin-warning); }
.admin-loan-setting-heading {
  display: grid;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
}
.admin-loan-setting-heading h3 { margin: 4px 0 0; font-size: 17px; line-height: 1.3; letter-spacing: -.015em; }
.admin-loan-setting-card > p { margin: 20px 0 16px; color: var(--admin-muted); font-size: 11px; line-height: 1.65; }
.admin-loan-setting-card .admin-setting-status { margin-top: 0; font-size: 10px; }
.admin-loan-setting-warning {
  display: flex;
  margin-top: 13px;
  padding: 13px 14px;
  align-items: flex-start;
  gap: 10px;
  color: #714500;
  border: 1px solid #e2bd67;
  border-radius: 9px;
  background: #fff5d9;
}
.admin-loan-setting-warning > span {
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: #a66a00;
  font-size: 10px;
  font-weight: 900;
}
.admin-loan-setting-warning p { display: grid; margin: 0; gap: 3px; font-size: 10px; line-height: 1.5; }
.admin-loan-setting-warning strong { font-size: 11px; }
.admin-loan-settings-content > .admin-read-only-notice { width: min(820px, 100%); }

.admin-duitnow-health {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #f8fbfb;
}
.admin-duitnow-health-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.admin-duitnow-health-heading h4 { margin: 0; font-size: 14px; }
.admin-duitnow-health-heading p { margin: 5px 0 0; color: var(--admin-muted); font-size: 10px; line-height: 1.5; }
.admin-duitnow-health-ranges { display: flex; flex-wrap: wrap; gap: 5px; }
.admin-duitnow-health-ranges button {
  min-width: 38px;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid #b9d2cf;
  border-radius: 999px;
  background: white;
  color: #315b58;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.admin-duitnow-health-ranges button[aria-pressed="true"] { border-color: var(--admin-teal); background: #e7f6f3; color: #075f57; }
.admin-duitnow-health-ranges button:focus-visible { outline: 3px solid rgba(8,123,112,.25); outline-offset: 2px; }
.admin-duitnow-health-summary { display: grid; margin-top: 16px; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.admin-duitnow-health-stat { min-width: 0; padding: 13px; border: 1px solid #d5e2e1; border-radius: 9px; background: white; }
.admin-duitnow-health-stat small { display: block; min-height: 26px; color: var(--admin-muted); font-size: 8px; font-weight: 750; line-height: 1.35; }
.admin-duitnow-health-stat strong { display: block; margin-top: 5px; font-size: 21px; line-height: 1; }
.admin-duitnow-health-stat-is-alert { border-color: #e6c878; background: #fff9e9; }
.admin-duitnow-health-issues { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--admin-line); }
.admin-duitnow-health-issues h5 { margin: 0 0 8px; font-size: 10px; }
.admin-duitnow-health-issue-row { display: grid; padding: 9px 0; grid-template-columns: minmax(0,1fr) auto; gap: 12px; border-top: 1px solid #e4eceb; }
.admin-duitnow-health-issue-row:first-child { border-top: 0; }
.admin-duitnow-health-issue-row span { display: grid; gap: 3px; font-size: 9px; font-weight: 750; }
.admin-duitnow-health-issue-row small { color: var(--admin-muted); font-size: 8px; font-weight: 650; overflow-wrap: anywhere; }
.admin-duitnow-health-issue-row strong { align-self: center; font-size: 13px; }
.admin-duitnow-health-empty { margin: 14px 0 0; color: var(--admin-success); font-size: 9px; font-weight: 750; }

@media (max-width: 700px) {
  .admin-duitnow-health-heading { display: grid; }
  .admin-duitnow-health-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-duitnow-health-ranges button { min-height: 44px; }
}

.admin-summary-grid {
  display: grid;
  margin: 24px 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-summary-card {
  display: flex;
  min-width: 0;
  min-height: 102px;
  padding: 20px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: var(--admin-paper);
  box-shadow: 0 5px 18px rgba(3, 23, 42, .04);
  color: var(--admin-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-summary-card:hover { border-color: #83bdb6; box-shadow: 0 9px 24px rgba(3, 55, 50, .1); }
.admin-summary-card:focus-visible { outline: 3px solid rgba(8, 123, 112, .34); outline-offset: 3px; }
.admin-summary-card[aria-pressed="true"] { border-color: #078f80; background: #eefaf7; box-shadow: inset 0 0 0 1px #078f80, 0 8px 22px rgba(3, 55, 50, .09); }
.admin-summary-filter-status { margin: -12px 0 20px; padding: 9px 12px; border-left: 4px solid #078f80; border-radius: 7px; background: #eefaf7; color: #175b54; font-size: 12px; font-weight: 750; }

.admin-summary-card > span:last-child { display: grid; min-width: 0; gap: 5px; }
.admin-summary-card small { color: var(--admin-muted); font-size: 10px; font-weight: 700; }
.admin-summary-card strong { font-size: 27px; line-height: 1; letter-spacing: -.04em; }
.admin-summary-icon {
  display: grid;
  flex: 0 0 auto;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 10px;
}

.admin-summary-icon-total { color: var(--admin-info); background: var(--admin-info-bg); }
.admin-summary-icon-pending { color: var(--admin-warning); background: var(--admin-warning-bg); }
.admin-summary-icon-approved { color: var(--admin-success); background: var(--admin-success-bg); }
.admin-summary-icon-disapproved { color: var(--admin-danger); background: var(--admin-danger-bg); }

.admin-list-card {
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 13px;
  background: var(--admin-paper);
  box-shadow: 0 8px 25px rgba(3, 23, 42, .05);
}

.admin-list-header {
  display: flex;
  min-height: 92px;
  padding: 20px 22px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--admin-line);
}

.admin-list-header h2 { margin-bottom: 5px; font-size: 17px; letter-spacing: -.02em; }
.admin-list-header p { margin-bottom: 0; color: var(--admin-muted); font-size: 10px; }
.admin-filters { display: flex; align-items: center; gap: 9px; }
.admin-search-field { position: relative; display: block; width: min(310px, calc(28 * var(--cw-vw))); }
.admin-search-field svg { position: absolute; top: 12px; left: 12px; width: 18px; height: 18px; color: #83909e; }
.admin-search-field input { min-height: 42px; padding-left: 39px; font-size: 11px; }
.admin-filter-field select { min-width: 170px; min-height: 42px; font-size: 11px; }
.admin-filter-button { min-height: 42px; }
#filterForm{display:grid;grid-template-columns:minmax(260px,2fr) repeat(3,minmax(170px,1fr));align-items:end}
#filterForm .admin-search-field{width:100%}
#filterForm .admin-filter-field select{width:100%;min-width:0}
#filterForm .admin-filter-actions{grid-column:1/-1;display:flex;align-items:center;gap:9px;flex-wrap:wrap}
#filterForm .admin-filter-actions .admin-button{min-height:42px;white-space:normal;line-height:1.25}
.admin-highlight-toggle[aria-pressed="true"]{color:#fff;border-color:#1f5da8;background:#1f5da8}

.admin-inline-error {
  display: flex;
  margin: 16px 22px 0;
  padding: 11px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--admin-danger);
  border: 1px solid #edc4c1;
  border-radius: 8px;
  background: var(--admin-danger-bg);
  font-size: 11px;
}

.admin-table-region { position: relative; min-height: 280px; overflow-x: auto; }
/* Item 345: previous rows shown while a filter refresh is in flight are dimmed
   and non-interactive so they read as stale, not as the new matching set. */
.admin-table-region[data-stale] .admin-table tbody { opacity: .45; pointer-events: none; }
.admin-table-region[data-stale] .admin-table tbody { transition: opacity .12s ease; }
/* Release .115: Pending Approval 8-column redesign. One compact line per row
   (~40px). Widths are set by per-column CLASSES on th/td (admin-col-*), not
   nth-child, so a column's width survives any future reorder. Scoped to
   #tableRegion so sibling admin tables that still scroll are unaffected.
   Columns: Customer 18 · Application 18 · S/D 6 · DuitNow 12 · History 12 ·
   Status 18 · Employer 10 · Action 148px. Sum of % = 94%; the remaining width
   is absorbed by the fixed 148px Action column so there is no horizontal scroll
   at ~1060px (1366px screen minus 252px sidebar). */
#tableRegion { overflow-x: clip; }
.admin-application-table { table-layout: fixed; width: 100%; }
.admin-application-table th,
.admin-application-table td {
  padding: 6px 10px; font-size: 11px;
  vertical-align: middle;
}
/* .115: rows are no longer forced to one line. A cell may grow to TWO lines when
   its content needs it, then clip (free-text cells use -webkit-line-clamp below);
   badge/number cells keep white-space:nowrap so they never wrap. Padding stays
   compact (~6px 10px) so a row with one-line content is still short. */
.admin-application-table th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-application-table td { overflow: hidden; }
.admin-application-table .admin-customer-cell { min-width: 0; }
/* 2-line clamp helper for free-text cells (package, history, employer): wrap to
   two lines, then ellipsis; full value available on hover. */
.admin-application-table .admin-package-cell strong,
.admin-application-table .admin-history-source small,
.admin-application-table .admin-col-employer .admin-link-button {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Item 205: compact employer cell is a single, non-wrapping line of short
   sector/size codes (e.g. "GOV / L"). Overrides the 2-line clamp above so the
   cell stays narrow and one line; full verbose text is on the button title. */
.admin-application-table .admin-col-employer .admin-link-button.admin-employer-compact {
  display: inline-block;
  -webkit-line-clamp: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
/* Item 211 (Part C): Google Maps employer-verification badge, shown on its own
   line under the employer code in the Employer column (no new table column, so
   the 8-column width math is unchanged). The badge always carries a TEXT label
   (Found / Partial / None), never colour alone, so it is readable for
   colour-blind staff; the "not checked" state is a muted em dash. */
.admin-application-table .admin-employer-gmap-cell { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.admin-gmap-line { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.admin-gmap-label { color: var(--admin-muted, #6b7280); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; }
.admin-gmap-badge {
  display: inline-block; padding: 0 6px; border-radius: 10px; font-size: 0.72rem;
  font-weight: 600; line-height: 1.5; border: 1px solid transparent; white-space: nowrap;
}
.admin-gmap-found { color: #0f5132; background: #d1e7dd; border-color: #badbcc; }
.admin-gmap-partial { color: #664d03; background: #fff3cd; border-color: #ffe69c; }
.admin-gmap-none { color: #842029; background: #f8d7da; border-color: #f5c2c7; }
.admin-gmap-none-checked { color: var(--admin-muted, #6b7280); background: transparent; border-color: transparent; font-weight: 400; }
/* Detail-panel maps verification card */
.admin-maps-verification .admin-maps-result { margin: 4px 0; }
.admin-maps-verification .admin-maps-mismatches { margin: 4px 0; padding-left: 18px; }
.admin-maps-verification .admin-maps-link { display: inline-block; margin: 4px 0; }
.admin-maps-verification .admin-maps-attribution { display: block; margin-top: 6px; color: var(--admin-muted, #6b7280); font-style: italic; }
/* Item 211 (maps display): inline Google comparison callout under a submitted
   employer field on a PARTIAL result. All text dark brown on amber for strong
   contrast, per the approved mock. */
.admin-maps-field-note { margin-top: 6px; padding: 7px 10px; border-radius: 8px; background: #f5d78a; border: 1px solid #d9b45e; font-size: 12.5px; line-height: 1.35; }
.admin-maps-field-note .admin-maps-field-note-head { font-weight: 700; color: #3d2606; }
.admin-maps-field-note .admin-maps-field-note-value { color: #3d2606; font-weight: 600; }
.admin-maps-field-note .admin-maps-field-note-reason { display: block; margin-top: 2px; font-size: 11px; color: #3d2606; }
.admin-application-table .admin-cell-stack { grid-auto-flow: column; align-items: center; gap: 6px; }
/* Customer cell (.116 bug A; item 221): avatar stays on the left; the copy is a
   VERTICAL stack whose whole content is at most two lines. Line 1 is the NAME
   only, clipped to a SINGLE line with an ellipsis — it must NEVER wrap to a
   second line (item 221, Sean explicit), so a long name like "Ahmad bin Ismail"
   shows "Ahmad bin Ism…" rather than growing the row. The full name is on the
   element title for hover. Line 2 is a small muted grey line (phone · review
   label), nowrap + ellipsis. */
.admin-application-table .admin-customer-cell { display: flex; align-items: flex-start; gap: 6px; }
.admin-application-table .admin-customer-cell .admin-customer-avatar { flex: 0 0 auto; }
.admin-application-table .admin-customer-cell .admin-cell-stack {
  display: flex; flex-direction: column; align-items: stretch; gap: 1px; min-width: 0; grid-auto-flow: unset;
}
.admin-application-table .admin-customer-cell .admin-client-link,
.admin-application-table .admin-customer-cell > .admin-cell-stack > strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  min-width: 0;
  max-width: 100%;
}
.admin-application-table .admin-customer-cell .admin-customer-meta {
  display: flex; align-items: center; gap: 4px; min-width: 0;
  font-size: 10.5px; color: var(--admin-muted, #60798a);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-application-table .admin-customer-cell .admin-customer-meta > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.admin-application-table .admin-customer-cell .admin-customer-meta .admin-customer-meta-sep { flex: 0 0 auto; color: var(--admin-muted, #9aa6b2); }
/* Item 157: Pending Approval package cell stacks vertically — line 1 is the
   package name (2-line clamp above), line 2 is a small muted line carrying the
   amount · acquisition source · approved-by. The meta line wraps rather than
   clips so none of the three values is lost. */
.admin-application-table .admin-package-cell {
  display: flex; flex-direction: column; align-items: stretch; gap: 1px; min-width: 0; grid-auto-flow: unset;
}
.admin-application-table .admin-package-cell .admin-package-meta {
  font-size: 10.5px; color: var(--admin-muted, #60798a);
  white-space: normal; overflow-wrap: anywhere; min-width: 0;
}
/* Item 221: the "P<N>" package-number badge sits inline immediately before the
   tier name on line 1 of the Package cell (both Pending Approval and All
   Applications). Small, high-contrast brand chip built from theme variables
   (never hardcoded hex), so it reads clearly beside the tier text without
   stealing a second line. */
.admin-application-table .admin-package-number {
  display: inline-block;
  padding: 0 5px;
  margin-right: 2px;
  border-radius: 6px;
  background: var(--admin-teal, #078b80);
  color: var(--admin-paper, #ffffff);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .02em;
  vertical-align: baseline;
  white-space: nowrap;
}
/* Item 163: the All-applications status-cell actor line ("Approved by X" /
   "Disapproved by X") sits on its own muted line under the badge and wraps
   instead of being clipped. */
.admin-application-table .admin-status-actor {
  display: block; font-size: 10.5px; color: var(--admin-muted, #60798a);
  white-space: normal; overflow-wrap: anywhere; min-width: 0;
}
/* badge/number cells (S/D, DuitNow, Action) stay on one line */
.admin-application-table .admin-col-record,
.admin-application-table .admin-col-duitnow,
.admin-application-table .admin-col-action { white-space: nowrap; }

/* per-column widths (item 9 / .116) — classes, not nth-child. All eight widths
   are PERCENTAGES that sum to exactly 100% so the fixed table never overflows
   #tableRegion (item 322: 18 + 16 + 5 + 11 + 12 + 14 + 14 + 10 = 100, Package
   widened so each Principal / Total due / Days line fits on one line); there is no fixed-px Action column any more (the old 94% + 148px
   needed a ~2470px table and clipped the right edge at normal zoom). The generic
   sticky last-column min-width:148px rule is neutralised for this table below. */
.admin-application-table th.admin-col-customer,    .admin-application-table td.admin-col-customer    { width: 18%; }
.admin-application-table th.admin-col-package,      .admin-application-table td.admin-col-package      { width: 16%; }
.admin-application-table th.admin-col-record,       .admin-application-table td.admin-col-record       { width: 5%;  text-align: center; }
.admin-application-table th.admin-col-duitnow,      .admin-application-table td.admin-col-duitnow      { width: 11%; }
.admin-application-table th.admin-col-history,      .admin-application-table td.admin-col-history      { width: 12%; }
.admin-application-table th.admin-col-status,       .admin-application-table td.admin-col-status       { width: 14%; }
.admin-application-table th.admin-col-employer,     .admin-application-table td.admin-col-employer     { width: 14%; }
.admin-application-table th.admin-col-action,       .admin-application-table td.admin-col-action       { width: 10%; }

/* Item 221: the All Applications table has 12 columns (Pending's 8 + Reference,
   Submitted, Last activity, User), so it needs its OWN width set — reusing the
   Pending 8-column percentages would overflow. These admin-col-all-* widths are
   PERCENTAGES summing to exactly 100% so the fixed table never overflows
   #tableRegion, and they apply to both th and td so widths stay class-based.
   Item 221 r2: the Reference column was removed (reference now lives under the
   customer name) and Status abbreviated, so widths are redistributed over the
   11 remaining columns. Item 221 follow-up (.272): slimmed so the full table
   fits a ~1280-1440px admin viewport with NO horizontal cut-off — Customer and
   Package trimmed, Status widened so the abbreviation ("PENDING"/"DISAPP") never
   clips, and Action widened so the "View" button shows fully:
   15 + 7 + 4 + 11 + 13 + 9 + 11 + 8 + 8 + 5 + 9 = 100.
   Item 322: Package widened (9 -> 15) so each Principal / Total due / Days
   line keeps label and value on one line:
   13 + 15 + 4 + 10 + 10 + 9 + 10 + 7 + 8 + 5 + 9 = 100 (disbursement variant:
   12 + 15 + 4 + 10 + 10 + 12 + 9 + 7 + 7 + 5 + 9 = 100). */
.admin-application-table th.admin-col-all-customer,     .admin-application-table td.admin-col-all-customer     { width: 13%; }
.admin-application-table th.admin-col-all-package,      .admin-application-table td.admin-col-all-package      { width: 15%; }
.admin-application-table th.admin-col-all-record,       .admin-application-table td.admin-col-all-record       { width: 4%;  text-align: center; }
.admin-application-table th.admin-col-all-duitnow,      .admin-application-table td.admin-col-all-duitnow      { width: 10%; }
.admin-application-table th.admin-col-all-history,      .admin-application-table td.admin-col-all-history      { width: 10%; }
.admin-application-table th.admin-col-all-status,       .admin-application-table td.admin-col-all-status       { width: 9%; }
.admin-application-table th.admin-col-all-employer,     .admin-application-table td.admin-col-all-employer     { width: 10%; }
.admin-application-table th.admin-col-all-submitted,    .admin-application-table td.admin-col-all-submitted    { width: 7%; }
.admin-application-table th.admin-col-all-lastactivity, .admin-application-table td.admin-col-all-lastactivity { width: 8%; }
.admin-application-table th.admin-col-all-user,         .admin-application-table td.admin-col-all-user         { width: 5%; }
.admin-application-table th.admin-col-all-action,       .admin-application-table td.admin-col-all-action       { width: 9%; }
/* Item 221 follow-up (.272): the all-tab fixed layout must never be forced wider
   than its column by cell content. Every all-tab cell wrapper can shrink
   (min-width:0); the status pill may shrink/ellipsis rather than push the column
   out; the truncating cells keep their own ellipsis rules defined above. */
.admin-application-table td.admin-col-all-customer > *,
.admin-application-table td.admin-col-all-package > *,
.admin-application-table td.admin-col-all-history > *,
.admin-application-table td.admin-col-all-employer > *,
.admin-application-table td.admin-col-all-status > * { min-width: 0; max-width: 100%; }
.admin-application-table td.admin-col-all-status .admin-status-badge {
  min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-application-table.admin-disbursement-table th.admin-col-all-status,
.admin-application-table.admin-disbursement-table td.admin-col-all-status { width: 12%; }
.admin-application-table.admin-disbursement-table th.admin-col-all-customer,
.admin-application-table.admin-disbursement-table td.admin-col-all-customer { width: 12%; }
.admin-application-table.admin-disbursement-table th.admin-col-all-history,
.admin-application-table.admin-disbursement-table td.admin-col-all-history { width: 10%; }
.admin-application-table.admin-disbursement-table th.admin-col-all-employer,
.admin-application-table.admin-disbursement-table td.admin-col-all-employer { width: 9%; }
.admin-application-table.admin-disbursement-table th.admin-col-all-submitted,
.admin-application-table.admin-disbursement-table td.admin-col-all-submitted,
.admin-application-table.admin-disbursement-table th.admin-col-all-lastactivity,
.admin-application-table.admin-disbursement-table td.admin-col-all-lastactivity { width: 7%; }
/* Item 221 r2: click-to-copy reference under the customer name (ALL tab line 2).
   Reads as interactive — accent colour + dotted underline + pointer — but it is
   a COPY action, not a navigation link; single line, ellipsis-clipped. */
.admin-application-table .admin-customer-cell .admin-ref-copy {
  color: var(--admin-teal, #078b80);
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  font-size: 10.5px;
}
.admin-application-table .admin-customer-cell .admin-ref-copy:hover { color: var(--admin-teal-bright, #18c9bc); }
.admin-application-table .admin-customer-cell .admin-ref-copy:focus-visible { outline: 2px solid var(--admin-teal, #078b80); outline-offset: 1px; }
/* Item 221: badge/number cells on the all tab stay single-line too. */
.admin-application-table .admin-col-all-record,
.admin-application-table .admin-col-all-duitnow,
.admin-application-table .admin-col-all-action { white-space: nowrap; }
/* Item 221: Submitted / Last activity 2-line date-over-time stack — date on
   line 1, time (smaller, muted) on line 2; max two lines, no wrapping. */
.admin-application-table .admin-datetime-stack {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; grid-auto-flow: unset;
}
.admin-application-table .admin-datetime-stack .admin-datetime-date { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.admin-application-table .admin-datetime-stack .admin-datetime-time { font-size: 10.5px; color: var(--admin-muted, #647488); white-space: nowrap; }

/* Package: bold package name only, up to two lines then ellipsis (item 2);
   reference · package · RM · submitted on hover via the td title */
.admin-application-table .admin-package-cell { min-width: 0; }
.admin-application-table .admin-package-cell strong { white-space: normal; }

/* S / D (item 5): settled green / disapproved red, grey at 0, tabular-nums */
.admin-pending-record { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.admin-pending-record .admin-record-settled { color: var(--admin-teal, #0f766e); }
.admin-pending-record .admin-record-disapproved { color: var(--admin-danger, #b4231f); }
.admin-pending-record .admin-record-zero { color: var(--admin-muted, #8a99a7); font-weight: 600; }
.admin-pending-record .admin-record-sep { margin: 0 4px; color: var(--admin-muted, #9aa6b2); font-weight: 400; }

/* DuitNow checks: the pill's existing leading dot becomes the WHOIS audit
   state, leaving the mismatch/manual indicators untouched beside it. */
.admin-application-table .admin-duitnow-checks-cell { display: inline-flex; flex-wrap: nowrap; gap: 8px; align-items: center; }
.admin-application-table .admin-duitnow-checks-cell .admin-link-button {
  display: inline-flex; align-items: center; text-decoration: none;
}
.admin-application-table .admin-duitnow-checks-cell .admin-link-button:hover,
.admin-application-table .admin-duitnow-checks-cell .admin-link-button:focus-visible {
  text-decoration: none;
}
.admin-status-badge.admin-duitnow-audit-complete::before,
.admin-status-badge.admin-duitnow-audit-partial::before,
.admin-status-badge.admin-duitnow-audit-checking::before,
.admin-status-badge.admin-duitnow-audit-unchecked::before {
  display: inline-grid; place-items: center; box-sizing: border-box;
  width: 14px; height: 14px; flex: 0 0 14px;
  border: 1.5px solid currentColor; border-radius: 50%; background: transparent;
  font-size: 9px; font-weight: 900; line-height: 1;
}
.admin-status-badge.admin-duitnow-audit-complete::before { content: "✓"; }
.admin-status-badge.admin-duitnow-audit-partial::before { content: "−"; }
.admin-status-badge.admin-duitnow-audit-checking::before {
  content: ""; border-top-color: transparent;
}
.admin-status-badge.admin-duitnow-audit-unchecked::before { content: ""; }
.admin-duitnow-checking { color: #526575; background: #e9eef2; }
.admin-count-badge.admin-count-mismatch,
.admin-count-badge.admin-count-manual {
  display: inline-flex; align-items: center; gap: 3px;
  min-width: 0; min-height: 0; width: auto; height: auto; padding: 0;
  font-size: 12px;
}
.admin-count-glyph { display: inline-block; width: 8px; height: 8px; line-height: 0; font-size: 0; flex: 0 0 auto; }
/* .116 (bug C): the DuitNow markers are CSS-drawn, not font glyphs — the admin
   font lacks ⬚/⚑ and rendered them as empty boxes. Mismatch = small red circle,
   manual review = small amber square. No unicode, no words; colour follows the
   metric and greys out at zero. */
.admin-count-mismatch .admin-count-glyph::before {
  content: ""; display: block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--admin-danger, #b4231f);
}
.admin-count-manual .admin-count-glyph::before {
  content: ""; display: block; width: 8px; height: 8px; border-radius: 1px;
  background: var(--admin-warning, #9a6800);
}
.admin-count-zero .admin-count-glyph::before { background: var(--admin-muted, #8a99a7); }
.admin-count-value { font-variant-numeric: tabular-nums; font-weight: 850; line-height: 1; }
/* colour by metric when >0, grey when 0 (item 6) */
.admin-count-mismatch.admin-count-positive .admin-count-value { color: var(--admin-danger, #b4231f); }
.admin-count-manual.admin-count-positive .admin-count-value   { color: var(--admin-warning, #9a6800); }
.admin-count-zero .admin-count-value { color: var(--admin-muted, #8a99a7); font-weight: 600; }

/* History & source (item 7, item 190): history badges on line 1, acquisition
   source on its OWN second line (full label, muted). Overrides the default
   horizontal cell-stack flow so the source wraps below rather than inline. */
.admin-history-source { min-width: 0; }
.admin-application-table .admin-history-source.admin-cell-stack {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px; grid-auto-flow: unset;
}
.admin-history-source small { font-size: 10.5px; color: var(--admin-muted, #60798a); overflow: hidden; text-overflow: ellipsis; }
.admin-history-source .admin-acquisition-line {
  font-size: 10.5px; color: var(--admin-muted, #60798a);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Item 318: on Pending Approval + All Applications the source line is plain
   text like the other History & source lines. Cancels ONLY the chip look the
   shared .admin-acquisition-line rule gives the application detail view (box,
   padding, rounded corners, tinted background, 5px left accent bar). Scoped to
   .admin-history-source, which only these two list cells use, so the detail
   view and every classification/status badge keep their styling. */
.admin-history-source .admin-acquisition-line {
  display: block; padding: 0; border: 0; border-radius: 0; background: none;
}

/* Status (item 8): badge group ellipsizes, waiting time NEVER clips */
.admin-application-table td .admin-cell-stack.admin-disbursement-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  white-space: normal;
}
.admin-disbursement-status .admin-status-group {
  flex: 0 0 auto;
  max-width: 100%;
  overflow: visible;
}
.admin-application-table td .admin-cell-stack.admin-disbursement-status .admin-status-badge {
  flex-shrink: 0;
  max-width: 100%;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: normal;
}
.admin-application-table .admin-col-status .admin-cell-stack { display: flex; align-items: center; gap: 8px; min-width: 0; }
.admin-status-group { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.admin-status-group .admin-status-badge { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.admin-status-group .admin-status-override { flex-shrink: 0; }
.admin-status-waiting { flex-shrink: 0; color: var(--admin-muted, #60798a); font-variant-numeric: tabular-nums; }
/* Item 178: keep status badges on a single line in generic admin tables so a
   narrow column can never wrap a status label mid-word or collapse the badge.
   Scoped to status cells only; a long label still ellipsizes (item 8 rules
   above) rather than wrapping. Additive + reversible: delete this block to
   restore the prior wrapping behaviour. Excludes the fixed-layout performance
   report, whose cells intentionally wrap (overflow-wrap: anywhere). */
.admin-table td.admin-col-status,
.admin-table th.admin-col-status { white-space: nowrap; min-width: 92px; }
.admin-table td.admin-col-status .admin-status-badge { white-space: nowrap; }
#performanceReportTableRegion .admin-table td.admin-col-status,
#performanceReportTableRegion .admin-table th.admin-col-status { min-width: 0; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th,
.admin-table td { padding: 14px 17px; border-bottom: 1px solid #e7edf0; text-align: left; vertical-align: middle; }
/* Item 118 update (#34): slimmer, denser columns so more fit on screen. Applied
   to the performance report's combined "count · amount" cells. Reversible: drop
   the admin-table-compact class from the two tables to restore full spacing. */
.admin-table-compact th,
.admin-table-compact td { padding: 9px 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-table-compact td { font-size: 12px; }
.admin-table-note { margin: 0 0 10px; color: #6d7d8e; font-size: 11px; }
.admin-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #eaf2ff; color: #2d5bd0; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
/* Item 118 (#119): forecast rows share the one performance table. A subtle tint
   and an inline FORECAST tag mark them as projections, not real figures. */
.admin-performance-forecast-row td { background: #f3f7ff; color: #4a5a6b; font-style: italic; }
.admin-performance-forecast-tag { padding: 1px 7px; font-size: 9px; vertical-align: middle; }
.admin-table th {
  color: #6d7d8e;
  background: #f8fafb;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-table td { color: #344a60; font-size: 11px; }
.admin-table tbody tr:hover { background: #f9fcfc; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
#performanceReportTableRegion .admin-table { table-layout: fixed; min-width: 1060px; }
/* Item 359: 12px headers and 14px body, matching the other admin tables.
   Item 359 follow-up: those sizes stay. Cells wrap inside the column instead
   of painting over the next column. 58px is the short-row minimum, not a cap. */
#performanceReportTableRegion .admin-table th,
#performanceReportTableRegion .admin-table td {
  padding: 11px 6px;
  overflow-wrap: normal;
  word-break: normal;
}
#performanceReportTableRegion .admin-table th {
  padding-top: 9.65px;
  padding-bottom: 9.65px;
  font-size: 12px;
  line-height: 1.05;
  white-space: normal;
}
#performanceReportTableRegion .admin-table td,
#performanceReportTableRegion .admin-table tfoot th {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}
#performanceReportTableRegion .admin-table td {
  font-size: 14px;
  line-height: 1.2;
  white-space: normal;
}
#performanceReportTableRegion .admin-performance-detail-trigger {
  display: inline-block;
  max-width: 100%;
  font-size: 14px;
  line-height: 1.2;
  min-height: 36px;
  white-space: normal;
  text-align: left;
}
#performanceReportTableRegion .admin-performance-forecast-tag {
  display: inline-block;
  margin-top: 2px;
}
#performanceReportTableRegion .admin-table th:nth-child(2),
#performanceReportTableRegion .admin-table td:nth-child(2) { width: 112px; }
#performanceReportTableRegion .admin-table th:first-child,
#performanceReportTableRegion .admin-table td:first-child { width: 104px; }
#performanceReportTableRegion .admin-table th:last-child,
#performanceReportTableRegion .admin-table td:last-child { width: 132px; min-width: 0; }
#performanceReportTableRegion .admin-revenue-column {
  color: #066c61;
  background: #e3f6f2;
  font-weight: 850;
  box-shadow: inset 2px 0 #6bc7ba;
}
#performanceReportTableRegion tfoot .admin-revenue-column {
  color: white;
  background: #087f72;
}
.package-report-filters { display:grid; gap:12px; }
.package-report-filter-row,.package-report-state-filter { display:flex; flex-wrap:wrap; align-items:end; gap:12px; }
.package-report-state-filter { border:0; padding:0; margin:0; }
.package-report-state-filter legend { width:100%; font-weight:700; }
.package-report-state-filter label { display:flex; align-items:center; gap:6px; min-height:36px; }
.package-report-table-region { overflow-x:auto; }
.package-report-table { min-width:1260px; border-collapse:separate; border-spacing:0; }
.package-report-table .package-sticky { position:sticky; background:var(--admin-surface, #fff); z-index:2; }
.package-report-table .package-sticky-first { left:0; min-width:140px; }
.package-report-table .package-sticky-second { left:140px; min-width:72px; box-shadow:4px 0 6px rgba(15,23,42,.08); }
.package-state-list { min-width:220px; }
.package-state { display:block; margin:3px 0; padding-left:14px; position:relative; }
.package-state::before { content:""; position:absolute; left:0; top:.55em; width:7px; height:7px; border:2px solid currentColor; border-radius:50%; }
.package-financial-detail { min-width:230px; margin:10px 0 0; }
.package-financial-detail div { display:flex; justify-content:space-between; gap:12px; }
.package-report-disclosure { color:var(--admin-muted, #475569); }
@media (max-width: 720px) {
  :where(html:not(.cw-desktop-scale)) .package-report-filter-row, :where(html:not(.cw-desktop-scale)) .package-report-state-filter{ align-items:stretch; }
  :where(html:not(.cw-desktop-scale)) .package-report-filter-row .admin-filter-field{ flex:1 1 45%; }
  :where(html:not(.cw-desktop-scale)) .package-report-table{ min-width:0; }
  :where(html:not(.cw-desktop-scale)) .package-report-table thead{ display:none; }
  :where(html:not(.cw-desktop-scale)) .package-report-table tbody, :where(html:not(.cw-desktop-scale)) .package-report-table tfoot, :where(html:not(.cw-desktop-scale)) .package-report-table tr, :where(html:not(.cw-desktop-scale)) .package-report-table td, :where(html:not(.cw-desktop-scale)) .package-report-table th{ display:block; width:100%; }
  :where(html:not(.cw-desktop-scale)) .package-report-table tr{ border:1px solid var(--admin-border, #dbe3ee); border-radius:12px; margin:0 0 12px; padding:12px; }
  :where(html:not(.cw-desktop-scale)) .package-report-table td, :where(html:not(.cw-desktop-scale)) .package-report-table th{ display:flex; justify-content:space-between; gap:16px; border:0; padding:7px 0; text-align:right; }
  :where(html:not(.cw-desktop-scale)) .package-report-table td::before, :where(html:not(.cw-desktop-scale)) .package-report-table th[data-label]::before{ content:attr(data-label); font-weight:700; text-align:left; }
  :where(html:not(.cw-desktop-scale)) .package-report-table .package-sticky{ position:static; box-shadow:none; background:transparent; }
  :where(html:not(.cw-desktop-scale)) .package-report-table tfoot th[colspan]{ display:block; text-align:left; }
}
.admin-permission-scroll-cue {
  display: flex;
  min-height: 44px;
  margin: 0;
  padding: 10px 14px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #c9ddd9;
  border-bottom: 1px solid #c9ddd9;
  background: #eef9f7;
  color: #075e56;
  font-size: .86rem;
  font-weight: 800;
  text-align: center;
}
.admin-permission-scroll-cue::after { content: "  →"; margin-left: 7px; font-size: 1.1em; }
.admin-permission-scroll-cue[data-overflow-position="middle"]::after { content: " ↔"; }
.admin-permission-scroll-cue[data-overflow-position="end"]::after { content: " ←"; }
.admin-permission-region { overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
.admin-permission-region:focus-visible { outline: 3px solid rgba(8,123,112,.32); outline-offset: -3px; }
.admin-permission-table { min-width: 760px; }
.admin-permission-table th:not(:first-child),
.admin-permission-table td:not(:first-child) { text-align: center; }
.admin-permission-table thead tr:first-child th { border-bottom-color: #d9e3e7; }
.admin-permission-control {
  display: inline-flex;
  min-height: 28px;
  padding: 3px 7px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 750;
}
.admin-permission-control input { width: 16px; height: 16px; margin: 0; accent-color: var(--admin-teal); }
.admin-permission-control:focus-within { outline: 2px solid rgba(0, 139, 128, .22); outline-offset: 2px; }
.admin-permission-control-disabled { color: #80909d; background: #f2f5f6; }
.admin-list-actions {
  display: flex;
  min-height: 72px;
  padding: 14px 20px;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  border-top: 1px solid var(--admin-line);
  background: #fbfcfd;
}
.admin-list-actions p { margin: 0 auto 0 0; color: var(--admin-muted); font-size: 10px; line-height: 1.45; }
.admin-customer-cell { display: flex; min-width: 180px; align-items: center; gap: 10px; }
.admin-customer-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--admin-teal);
  border-radius: 50%;
  background: var(--admin-ice);
  font-size: 10px;
  font-weight: 850;
}

.admin-cell-stack { display: grid; min-width: 0; gap: 3px; }
.admin-cell-stack strong { overflow: hidden; color: var(--admin-ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-cell-stack small { color: var(--admin-muted); font-size: 9px; }
/* Bank transactions: the payout View link sits directly under its category label. */
.admin-bank-category-stack { justify-items: start; }
.admin-payout-view { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; }
.admin-payout-view svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Item 229: Overdue debts (Bad Debt) table column widths. The loan/client cell
   uses the shared clientLoanCell (name + copyable loan id). Previously the table
   was auto-layout so the many money/date columns squeezed loan/client thin and
   the client name clipped on one line. Scope a fixed layout + per-column widths
   to #badDebtTableRegion only (never the other admin-operations-table tabs),
   give loan/client the widest share, let its name wrap to TWO lines like All
   Loans, and keep the renamed/narrowed columns (Repayment, Net chg, Additional
   charges, Extended, Status) tight. 11 columns; widths are percentages that sum
   to 100 so the fixed table never overflows the region. Item 317 inserts the
   Amounts stack as column 2, so the map below is 12 columns (still 100%). */
#badDebtTableRegion .admin-table { table-layout: fixed; }
#badDebtTableRegion .admin-table th,
#badDebtTableRegion .admin-table td { overflow: hidden; }
#badDebtTableRegion .admin-table th:nth-child(1),
#badDebtTableRegion .admin-table td:nth-child(1) { width: 14%; }  /* Loan / client */
#badDebtTableRegion .admin-table th:nth-child(2),
#badDebtTableRegion .admin-table td:nth-child(2) { width: 10%; }  /* Amounts (item 317) */
#badDebtTableRegion .admin-table th:nth-child(3),
#badDebtTableRegion .admin-table td:nth-child(3) { width: 7%; }  /* Repayment */
#badDebtTableRegion .admin-table th:nth-child(4),
#badDebtTableRegion .admin-table td:nth-child(4) { width: 7%; }  /* Released */
#badDebtTableRegion .admin-table th:nth-child(5),
#badDebtTableRegion .admin-table td:nth-child(5) { width: 6%; }  /* Received */
#badDebtTableRegion .admin-table th:nth-child(6),
#badDebtTableRegion .admin-table td:nth-child(6) { width: 5%; }  /* Net chg */
#badDebtTableRegion .admin-table th:nth-child(7),
#badDebtTableRegion .admin-table td:nth-child(7) { width: 7%; }  /* Additional charges */
#badDebtTableRegion .admin-table th:nth-child(8),
#badDebtTableRegion .admin-table td:nth-child(8) { width: 7%; }  /* Outstanding */
#badDebtTableRegion .admin-table th:nth-child(9),
#badDebtTableRegion .admin-table td:nth-child(9) { width: 8%; }  /* Due date / aging */
#badDebtTableRegion .admin-table th:nth-child(10),
#badDebtTableRegion .admin-table td:nth-child(10) { width: 6%; }  /* Extended */
#badDebtTableRegion .admin-table th:nth-child(11),
#badDebtTableRegion .admin-table td:nth-child(11) { width: 8%; }  /* Status */
#badDebtTableRegion .admin-table th:nth-child(12),
#badDebtTableRegion .admin-table td:nth-child(12) { width: 15%; }  /* Actions (View details + More) */
/* Item 229 header casing: the global .admin-table th rule force-uppercases every
   header. The i18n values are already stored sentence-case ("Additional charges",
   "Extended"), so disable the transform on just these two header cells to render
   them first-letter-capital. Also let "Additional charges" wrap to two lines
   (Additional / charges) to save column width -- the global th is white-space:nowrap. */
#badDebtTableRegion .admin-table th:nth-child(7) {
  text-transform: none;
  white-space: normal;
  line-height: 1.15;
  word-break: normal;
  overflow-wrap: normal;
}
#badDebtTableRegion .admin-table th:nth-child(10) {
  text-transform: none;
}
/* Item 229 fix: the Actions column holds two buttons (View details + More) and
   must NOT clip. The generic admin-table sticky last-column rule forces a
   min-width:148px that, combined with table-layout:fixed, pushed the column off
   the right edge; neutralise it here and let the action cell overflow visibly so
   the buttons are never cut off. */
#badDebtTableRegion .admin-table th:nth-child(12),
#badDebtTableRegion .admin-table td:nth-child(12) { overflow: hidden; min-width: 0; }
#badDebtTableRegion .admin-table td:nth-child(12) .admin-table-actions {
  min-width: 0; flex-wrap: nowrap; gap: 4px; justify-content: flex-end; white-space: nowrap;
}
#badDebtTableRegion .admin-table td:nth-child(12) .admin-table-actions > * {
  flex: 0 0 auto; white-space: nowrap;
}
#badDebtTableRegion .admin-table td:nth-child(12) .admin-button,
#badDebtTableRegion .admin-table td:nth-child(12) .admin-action-menu-trigger {
  padding: 5px 8px; font-size: 10px;
}
/* two-line client name in the wider loan/client column. Target the actual name
   element: .admin-client-link button (clickable) or the <strong> fallback. */
#badDebtTableRegion .admin-table td:nth-child(1) .admin-cell-stack .admin-client-link,
#badDebtTableRegion .admin-table td:nth-child(1) .admin-cell-stack > strong {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
}
#badDebtTableRegion .admin-table td:nth-child(1) .admin-cell-stack,
#badDebtTableRegion .admin-table td:nth-child(1) .admin-cell-stack * { min-width: 0; max-width: 100%; }
/* status badge may shrink/ellipsis rather than widen its column. */
#badDebtTableRegion .admin-table td:nth-child(11) .admin-status-badge {
  min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Item 229 steer: let the "Additional charges" header (col 6) wrap to two lines
   (Additional / charges) instead of clipping to "ADDITIONAL CHA…". The generic
   header may be nowrap; override just this column's header to normal wrapping,
   and give all bad-debt headers room to wrap + top-align so a two-line header
   does not misalign the single-line ones. */
/* Item 229 steer: the Additional charges and Extended headers must look exactly
   like every other header (same font-size, uppercase style, baseline alignment).
   The earlier two-line/top-align override made them stand out, so it is removed;
   with the Actions column fixed and columns rebalanced these headers have room
   on one line like the rest. No per-header overrides here. */
/* Item 227: main Repayments ledger table. Scope a fixed layout to
   #repaymentTableRegion only: widen Loan/client (2-line name like All Loans),
   shrink Bank + Reference (the reference is a fixed-length value), keep Actions
   wide enough for its buttons and never clipped. Widths sum to 100.
   Item 253: item 248 inserted the "+/- Days" column at position 6, so the table
   now has 11 columns: Date, Loan/client, Type, Received, Charges, +/- Days,
   Method, Bank, Reference, Recorded by, Actions. The nth-child indexes below
   were still the 10-column map, so the fixed layout gave the 11th (Actions)
   column 0% width and overflow:hidden clipped View details / Reverse / Receipt
   to nothing. Re-indexed for 11 columns; Actions is nth-child(11).
   Item 317: the Amounts stack is inserted after Loan / client (column 3), so
   the table is 12 columns; Reference is nth-child(10), Actions nth-child(12).
   Item 473: +/- Days must fit a one-line value like +99 (e99), so that column
   is a fixed 6rem (min-width 6rem) instead of 5%.
   Item 474: table-layout:fixed ignored min-width on Type and Received, so
   Extension and RM 1,000.00 could still clip. Those columns now use explicit
   rem widths (8rem / 7rem) like Days.
   Item 475: Date is a fixed 8rem so a ZH value like 2026年11月17日 stays on
   one line (the time already wraps underneath). Date and Loan/client are
   sticky-left with solid backgrounds and a higher z-index so scrolled
   AMOUNTS cannot paint through Date; Loan/client sticks at left: 8rem
   (the Date width), not right:0. Actions stays sticky-right.
   Item 476 / R475-D1: Received/Amount is widened from 7rem to 8.5rem so a
   ZH value like MYR 1,000.00 stays on one line (EN RM 1,000.00 already fit).
   Rem columns are Date 8 + Type 8 + Received 8.5 + Days 6 = 30.5rem; the
   remaining 8 columns still sum to 68%. Table min-width is 96rem
   (30.5 / 0.32 = 95.3125, with slack) so rem columns are not squeezed.
   A Type+Amount+Days-only floor (22.5 / 0.25 = 90rem) is below the .475
   Date-inclusive 92rem, so the Date-inclusive formula is used and raised
   to 96rem. The region still scrolls horizontally with no page-level
   horizontal scroll at 1440 or 1024. */
#repaymentTableRegion { overflow-x: auto; max-width: 100%; }
#repaymentTableRegion .admin-table { table-layout: fixed; width: 100%; min-width: 96rem; }
#repaymentTableRegion .admin-table th,
#repaymentTableRegion .admin-table td { overflow: hidden; }
#repaymentTableRegion .admin-table th:nth-child(1),
#repaymentTableRegion .admin-table td:nth-child(1) {
  width: 8rem; min-width: 8rem;
}  /* Date (item 475): wide enough for 2026年11月17日 on one line */
#repaymentTableRegion .admin-table th:nth-child(2),
#repaymentTableRegion .admin-table td:nth-child(2) { width: 12%; }  /* Loan / client */
#repaymentTableRegion .admin-table th:nth-child(3),
#repaymentTableRegion .admin-table td:nth-child(3) { width: 9%; min-width: 7rem; }  /* Amounts (item 317) */
#repaymentTableRegion .admin-table th:nth-child(4),
#repaymentTableRegion .admin-table td:nth-child(4) {
  width: 8rem; min-width: 8rem; white-space: nowrap; overflow: hidden;
}  /* Type (item 474): wide enough for the Extension badge on one line */
#repaymentTableRegion .admin-table th:nth-child(5),
#repaymentTableRegion .admin-table td:nth-child(5) {
  width: 8.5rem; min-width: 8.5rem; white-space: nowrap; overflow: hidden;
}  /* Received / Amount (item 476 / R475-D1): wide enough for MYR 1,000.00 in ZH */
#repaymentTableRegion .admin-table th:nth-child(6),
#repaymentTableRegion .admin-table td:nth-child(6) { width: 5%; }  /* Charges */
#repaymentTableRegion .admin-table th:nth-child(7),
#repaymentTableRegion .admin-table td:nth-child(7) {
  width: 6rem; min-width: 6rem; white-space: nowrap; overflow: hidden;
}  /* +/- Days (item 248 / 473): wide enough for +99 (e99) on one line */
#repaymentTableRegion .admin-table th:nth-child(8),
#repaymentTableRegion .admin-table td:nth-child(8) { width: 5%; }  /* Method */
#repaymentTableRegion .admin-table th:nth-child(9),
#repaymentTableRegion .admin-table td:nth-child(9) { width: 5%; }  /* Bank */
#repaymentTableRegion .admin-table th:nth-child(10),
#repaymentTableRegion .admin-table td:nth-child(10) { width: 7%; }  /* Reference (fixed-length) */
#repaymentTableRegion .admin-table th:nth-child(11),
#repaymentTableRegion .admin-table td:nth-child(11) { width: 5%; }  /* Recorded by */
#repaymentTableRegion .admin-table th:nth-child(12),
#repaymentTableRegion .admin-table td:nth-child(12) { width: 20%; }  /* Actions (Receipt + View details + More) */
/* Item 227 / 473: keep the three Actions controls on ONE line INSIDE the cell.
   A real min-width (not 0) stops Receipt from colliding with Reference when
   the table is narrow; overflow stays hidden so buttons do not spill left.
   The region scrolls horizontally instead of shrinking those controls. */
#repaymentTableRegion .admin-table th:nth-child(12),
#repaymentTableRegion .admin-table td:nth-child(12) { overflow: hidden; min-width: 14rem; }

/* Item 475: opaque sticky Date + Loan/client on the left. The generic
   .admin-table-region first-child rule used background:inherit, so scrolled
   AMOUNTS painted through Date. Loan/client had computed sticky; right:0
   (wrong edge). Date is left:0; Loan/client is left: 8rem (the Date width).
   Actions stays sticky-right. */
#repaymentTableRegion .admin-table th:nth-child(1),
#repaymentTableRegion .admin-table td:nth-child(1) {
  position: sticky;
  left: 0;
  right: auto;
  z-index: 3;
  background: #fff;
}
#repaymentTableRegion .admin-table th:nth-child(1) { z-index: 4; background: #f8fafb; }
#repaymentTableRegion .admin-table th:nth-child(2),
#repaymentTableRegion .admin-table td:nth-child(2) {
  position: sticky;
  left: 8rem;
  right: auto;
  z-index: 2;
  background: #fff;
  box-shadow: 8px 0 14px rgba(6, 30, 53, .08);
}
#repaymentTableRegion .admin-table th:nth-child(2) { z-index: 3; background: #f8fafb; }
#repaymentTableRegion .admin-table tbody tr:hover td:nth-child(1),
#repaymentTableRegion .admin-table tbody tr:hover td:nth-child(2) { background: #f9fcfc; }
#repaymentTableRegion .admin-table td:nth-child(1) .admin-datetime-date { white-space: nowrap; }
#repaymentTableRegion .admin-table th:nth-child(12),
#repaymentTableRegion .admin-table td:nth-child(12) { z-index: 3; }
#repaymentTableRegion .admin-table th:nth-child(12) { z-index: 4; background: #f8fafb; }
#repaymentTableRegion .admin-table td:nth-child(12) .admin-table-actions {
  min-width: 0; flex-wrap: nowrap; gap: 4px; justify-content: flex-end; white-space: nowrap;
}
#repaymentTableRegion .admin-table td:nth-child(12) .admin-table-actions > * {
  flex: 0 0 auto; white-space: nowrap;
}
#repaymentTableRegion .admin-table td:nth-child(12) .admin-button,
#repaymentTableRegion .admin-table td:nth-child(12) .admin-action-menu-trigger {
  padding: 5px 7px; font-size: 10px;
}
/* two-line client name in the wider loan/client column. The name renders as a
   .admin-client-link button (clickable) or a <strong> fallback; target both.
   The base rule clips it to one line (white-space:nowrap + ellipsis) -- override
   to allow two lines with a line clamp. */
#repaymentTableRegion .admin-table td:nth-child(2) .admin-cell-stack .admin-client-link,
#repaymentTableRegion .admin-table td:nth-child(2) .admin-cell-stack > strong {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
}
#repaymentTableRegion .admin-table td:nth-child(2) .admin-cell-stack,
#repaymentTableRegion .admin-table td:nth-child(2) .admin-cell-stack * { min-width: 0; max-width: 100%; }
/* Reference is fixed-length: single line, trim surrounding slack. (Item 253:
   Reference is column 9 since item 248 added +/- Days.) */
#repaymentTableRegion .admin-table td:nth-child(10) { white-space: nowrap; text-overflow: ellipsis; }
/* Item 223: generic click-to-copy id (name+id tables: All Loans, Collections,
   Bad Debt, Repayments loan/client + Reference, Clients, Abandoned, Client 360).
   Reuses the item 221 r2 reference-under-name look — accent colour + dotted
   underline + pointer — on the id TEXT itself (no icon). Single line, ellipsis
   clipped so the FULL id is copied even when the display is truncated with "...".
   The more specific All-Applications rule above keeps its own sizing. */
.admin-ref-copy {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--admin-teal, #078b80);
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: pointer;
  font-size: 10.5px;
}
.admin-ref-copy:hover { color: var(--admin-teal-bright, #18c9bc); }
.admin-ref-copy:focus-visible { outline: 2px solid var(--admin-teal, #078b80); outline-offset: 1px; }
/* A missing id renders as plain muted text, not an interactive copy target. */
.admin-ref-copy.admin-ref-copy-empty {
  color: var(--admin-muted, #9aa6b2);
  text-decoration: none;
  cursor: default;
}
/* The id line sits inside admin-cell-stack in every name/id cell; keep it a
   single ellipsized line so the slim fixed-layout column never cuts off. */
.admin-cell-stack .admin-ref-copy { font-size: 9px; }
/* Client 360 loan summary row: the copyable loan id + the status/outstanding
   meta share one line that must shrink to the subcard without horizontal cut. */
.admin-client360-summary-row { display: flex; align-items: baseline; min-width: 0; gap: 2px; }
.admin-client360-summary-row .admin-ref-copy { flex: 0 1 auto; }
.admin-client360-summary-row .admin-client360-summary-meta {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-message-preview { display: grid; min-width: 12rem; max-width: 22rem; gap: 4px; }
.admin-message-provenance { color: var(--admin-teal); font-size: 9px; font-weight: 800; }
.admin-message-preview-text {
  display: -webkit-box;
  max-height: calc(1.45em * 2);
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--admin-ink);
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.admin-message-application-link { width: fit-content; max-width: 100%; font-size: 9px; }
.admin-message-detail-application-link { width: fit-content; min-height: 44px; margin-top: 12px; }
.admin-future-message-table .admin-view-button { min-height: 44px; }
#closeDrawerButton { min-width: 44px; min-height: 44px; }
.admin-message-detail-content { display: grid; gap: 10px; }
.admin-message-detail-content h3 { margin-bottom: 0; }
.admin-message-content {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--admin-ink);
  font-size: 13px;
  line-height: 1.6;
  user-select: text;
  white-space: pre-wrap;
}
.admin-reference { color: var(--admin-ink); font-weight: 750; white-space: nowrap; }
.admin-money { color: var(--admin-ink); font-weight: 750; white-space: nowrap; }
.admin-charge-amount { color: var(--admin-ink); }
.admin-charge-credit { color: var(--admin-danger); }
.admin-days { color: var(--admin-ink); font-weight: 650; white-space: nowrap; text-align: center; }
.admin-days-early { color: var(--admin-success); }
.admin-days-late { color: var(--admin-danger); }
.admin-days-extended { color: var(--admin-muted); font-weight: 500; }
.admin-payment-plan { display: grid; gap: 4px; min-width: 142px; }
.admin-payment-plan-now { color: #087f72; font-size: 12px; white-space: nowrap; }
.admin-payment-plan-balance { color: #5f7284; font-size: 10px; white-space: nowrap; }
.admin-payment-plan-full { color: #6c7f8f; font-size: 10px; }
.admin-date { white-space: nowrap; }
.admin-created-time { min-width: 8.75rem; }
.admin-created-time strong { font-variant-numeric: tabular-nums; }
.admin-created-time small { color: var(--admin-muted, #60798a); font-variant-numeric: tabular-nums; }
.admin-view-button { min-height: 36px; padding: 0 12px; }
.admin-table-review-flags { display: flex; margin-top: 7px; gap: 5px; flex-wrap: wrap; }
.admin-mini-warning-badge,
.admin-mini-document-badge {
  display: inline-flex;
  min-height: 20px;
  padding: 0 6px;
  align-items: center;
  border-radius: 5px;
  font-size: 7px;
  font-weight: 850;
  white-space: nowrap;
}

.admin-mini-warning-badge { color: #774900; border: 1px solid #e0bc6a; background: #fff3d1; }
.admin-mini-document-badge { color: #275f72; border: 1px solid #bdd8df; background: #eaf6f8; }

/* Item 159 (#29): the shared-NOK-number badge is a real button opening a popup. */
button.admin-contact-duplicate-badge { cursor: pointer; font-family: inherit; }
button.admin-contact-duplicate-badge:hover { background: #ffe8ad; }
button.admin-contact-duplicate-badge:focus-visible { outline: 2px solid #774900; outline-offset: 2px; }
.admin-contact-duplicates-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.admin-contact-duplicates-list li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid #e4e7ec; border-radius: 8px; }
.admin-contact-duplicates-list li small { color: #667085; }

.admin-status-badge {
  display: inline-flex;
  min-height: 25px;
  padding: 0 8px;
  align-items: center;
  gap: 6px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-status-badge::before { width: 6px; height: 6px; content: ""; border-radius: 50%; background: currentColor; }
.admin-count-button { min-width: 44px; min-height: 44px; }
.admin-count-badge {
  display: inline-flex;
  width: auto;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0 9px;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.admin-count-badge::before { display: none; }
.admin-count-zero { color: var(--admin-teal); }
.admin-count-positive { color: var(--admin-warning); }
.admin-status-pending,
.admin-status-submitted,
.admin-status-under_review,
.admin-status-in_progress { color: #526575; background: #e9eef2; }
.admin-status-review_in_progress { color: #582b88; background: #f1e9fb; border-color: #d7c1ef; }
.admin-status-received { color: #526575; background: #e9eef2; }
.admin-status-waiting_payment { color: var(--admin-warning); background: var(--admin-warning-bg); }
.admin-status-approved,
.admin-status-success,
.admin-status-passed,
.admin-status-successful { color: var(--admin-success); background: var(--admin-success-bg); }
.admin-status-disapproved,
.admin-status-rejected,
.admin-status-failed,
.admin-status-retry { color: var(--admin-danger); background: var(--admin-danger-bg); }
.admin-status-manual_review,
.admin-status-card_ready { color: var(--admin-info); background: var(--admin-info-bg); }
.admin-status-draft,
.admin-status-otp,
.admin-status-otp_verified,
.admin-status-expired,
.admin-status-unknown { color: #566576; background: #edf1f3; }

.admin-table-loading,
.admin-detail-loading {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--admin-muted);
  font-size: 11px;
}

.admin-empty-state {
  display: grid;
  min-height: 310px;
  padding: 38px 20px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.admin-empty-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 15px;
  place-items: center;
  color: #6b8194;
  border-radius: 14px;
  background: #edf3f5;
}

.admin-empty-state h3 { margin-bottom: 7px; font-size: 16px; }
.admin-empty-state p { max-width: 360px; margin-bottom: 16px; color: var(--admin-muted); font-size: 11px; line-height: 1.5; }
.admin-pagination {
  display: flex;
  min-height: 66px;
  padding: 10px 22px;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  border-top: 1px solid var(--admin-line);
}

.admin-pagination span { color: var(--admin-muted); font-size: 10px; }
.admin-pagination .admin-button { min-height: 36px; padding: 0 12px; }
.admin-direct-pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.admin-direct-pager .admin-direct-page { min-width: 36px; padding: 0 9px; }
.admin-direct-pager .admin-direct-page[aria-current="page"] { border-color: var(--admin-teal); background: var(--admin-teal); color: #fff; }
.admin-direct-page-error { flex-basis: 100%; color: var(--admin-danger); font-size: 12px; }
.admin-direct-page-summary { flex-basis: 100%; text-align: center; }
.admin-direct-page-ellipsis { padding: 0 2px; }
.admin-direct-page-go { display: flex; align-items: center; justify-content: center; gap: 6px; flex-basis: 100%; margin-top: 2px; }
.admin-direct-page-go input { width: 66px; min-height: 36px; padding: 7px 8px; border: 1px solid var(--admin-line); border-radius: 9px; color: var(--admin-ink); background: #fff; font: inherit; }
.admin-direct-page-go input:focus { outline: 3px solid rgba(7,143,128,.18); border-color: var(--admin-teal); }

.admin-mobile-nav-overlay,
.admin-drawer-overlay {
  position: fixed;
  z-index: 70;
  inset: 0;
  background: rgba(3, 23, 42, .68);
  backdrop-filter: blur(5px);
}

.admin-mobile-nav-overlay { z-index: 30; }
.admin-drawer-overlay { z-index: 70; }

.admin-detail-drawer {
  position: fixed;
  z-index: 80;
  top: 12px;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  width: auto;
  overflow: hidden;
  border: 1px solid rgba(203, 216, 223, .9);
  border-radius: 18px;
  background: var(--admin-canvas);
  box-shadow: 0 28px 90px rgba(3, 23, 42, .35);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.admin-drawer-header {
  padding: 18px 24px 13px;
  border-bottom: 1px solid var(--admin-line);
  background: white;
}

.admin-drawer-title-row { display: flex; justify-content: space-between; gap: 12px; }
.admin-drawer-title-row > div { min-width: 0; flex: 1 1 auto; }
.admin-drawer-title-row h2 { margin: 5px 0 3px; font-size: 22px; letter-spacing: -.035em; }
.admin-drawer-title-row p { margin: 0; color: var(--admin-muted); font-size: 11px; }
.admin-client-portal-button { align-self: center; flex: 0 0 auto; min-height: 38px; padding: 8px 11px; gap: 7px; white-space: nowrap; }
.admin-client-portal-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.admin-drawer-meta { display: flex; min-height: 32px; margin-top: 10px; align-items: center; justify-content: space-between; gap: 14px; }
.admin-drawer-body { padding: 18px 24px 30px; overflow-y: auto; }

/* Item 104: compact Client 360 content inside the existing modal shell. */
.admin-client360-drawer .admin-drawer-header { position: sticky; top: 0; z-index: 8; background: var(--admin-surface, #fff); }
.admin-client360 { display: grid; gap: 16px; min-width: 0; }
.admin-client360-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid #dce7e7; border-radius: 16px; background: #fff; }
.admin-client360-intro { display: grid; gap: 3px; margin-right: auto; }
.admin-client360-intro strong { color: #0b2b42; font-size: 1.05rem; }
.admin-client360-intro span { color: #647985; }
.admin-client360-main-grid { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 16px; align-items: start; }
.admin-client360-main-grid > .admin-client360-section:first-child { grid-column: span 5; }
.admin-client360-main-grid > .admin-client360-section:last-child { grid-column: span 7; }
.admin-client360-section { min-width: 0; padding: 16px; border: 1px solid #dce7e7; border-radius: 16px; background: #fff; }
.admin-client360-section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.admin-client360-section-heading-copy { display: grid; gap: 3px; min-width: 0; }
.admin-client360-section-heading h3 { margin: 0; color: #0b2b42; font-size: 1.05rem; }
.admin-client360-section-heading p { margin: 0; color: #647985; font-size: .9rem; }
.admin-client360-section-body { min-width: 0; }
.admin-client360-section .admin-reference { min-width: 0; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
.admin-client360-icon-tile { display: inline-grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 12px; background: #e4f6f1; color: #007c72; }
.admin-client360-icon-tile svg { width: 22px; height: 22px; pointer-events: none; }
.admin-client360-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.admin-client360-kpi { display: flex; align-items: center; gap: 12px; min-height: 88px; padding: 15px; border: 1px solid #dce7e7; border-radius: 15px; background: #fff; }
.admin-client360-kpi > .admin-client360-icon-tile { flex-basis: 44px; width: 44px; height: 44px; }
.admin-client360-kpi-copy { display: grid; gap: 4px; min-width: 0; }
.admin-client360-kpi small { color: #647985; font-weight: 700; }
.admin-client360-kpi strong { color: #0b2b42; font-size: 1.3rem; }
.admin-client360-kpi-warning { background: #fff9e8; border-color: #efd186; }
.admin-financial-summary { min-width: 0; padding: 16px; border: 1px solid #dce7e7; border-radius: 16px; background: #fff; }
.admin-financial-summary-body { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; min-width: 0; }
.admin-financial-summary-card { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 96px; padding: 15px; border: 1px solid #dce7e7; border-radius: 15px; background: #fbfdfd; }
.admin-financial-summary-card-copy { display: grid; gap: 4px; min-width: 0; }
.admin-financial-summary-card small { color: #647985; font-weight: 700; }
.admin-financial-summary-card strong { color: #0b2b42; font-size: 1.25rem; overflow-wrap: anywhere; }
.admin-financial-summary-adjustment { width: fit-content; max-width: 100%; padding: 3px 7px; border-radius: 999px; font-size: .74rem; font-weight: 750; overflow-wrap: anywhere; }
.admin-financial-summary-adjustment-credit { background: #e6f6ef; color: #176443; }
.admin-financial-summary-adjustment-charge { background: #fff0e7; color: #8a3d12; }
.admin-financial-summary-adjustment-neutral { background: #edf2f4; color: #435c68; }
.admin-financial-summary-context { grid-column: 1 / -1; margin: 0; color: #647985; font-size: .82rem; }
.admin-financial-summary-state { grid-column: 1 / -1; margin: 0; padding: 14px; border-radius: 12px; background: #f2f7f7; color: #435c68; }
.admin-client360-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: start; }
.admin-client360-summary-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 9px 0; border-bottom: 1px solid #e5eeee; }
.admin-client360-summary-row > .admin-button { margin-left: auto; }
.admin-client360-detail-list { margin: 0; }
.admin-client360-nested-card, .admin-client360-subcard { min-width: 0; margin-top: 14px; padding: 14px; border: 1px solid #e5eeee; border-radius: 14px; background: #fbfdfd; }
.admin-client360-nested-card h4, .admin-client360-subcard h4 { margin: 0 0 10px; color: #0b2b42; }
.admin-client360-notice { padding: 12px 14px; border-radius: 12px; background: #eaf6f5; color: #244b55; margin-bottom: 12px; }
.admin-client360-notice-warning { background: #fff6db; color: #6f5100; }
.admin-client360-evidence-grid { display: grid; grid-template-columns: 1fr; gap: 14px; min-width: 0; overflow: hidden; }
.admin-client360-evidence-grid .admin-media-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
.admin-client360-evidence-card { display: grid; gap: 10px; min-width: 0; overflow: hidden; padding: 16px; border: 1px solid #dce7e7; border-radius: 15px; background: #fff; }
.admin-client360-evidence-card > small { color: #647985; }
.admin-client360-evidence-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; min-width: 0; overflow: hidden; }
.admin-client360-evidence-action { position: relative; justify-content: flex-start; min-width: 0; min-height: 44px; overflow: hidden; }
.admin-client360-evidence-thumbnail { width: 72px; height: 48px; flex: 0 0 72px; border-radius: 8px; object-fit: cover; background: #edf4f4; }
.admin-client360-evidence-play { position: absolute; left: 51px; top: 50%; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(11,43,66,.82); color: #fff; font-size: 11px; transform: translate(-50%,-50%); }
.admin-client360-evidence-label { min-width: 0; overflow-wrap: anywhere; text-align: left; }
.admin-client360-evidence-thumbnail-missing { background: #f7f9f9; }
.admin-client360-evidence-thumbnail-missing .admin-client360-evidence-play { display: none; }
.admin-client360-evidence-action > .admin-client360-icon-tile { flex-basis: 28px; width: 28px; height: 28px; border-radius: 8px; }
.admin-client360-evidence-action > .admin-client360-icon-tile svg { width: 18px; height: 18px; }
.admin-client360-package-table { display: grid; gap: 0; margin: 12px 0 16px; border: 1px solid #dce7e7; border-radius: 15px; overflow: hidden; background: #fff; }
.admin-client360-package-row { display: grid; grid-template-columns: minmax(120px,.75fr) minmax(190px,1.3fr) minmax(170px,1fr) minmax(140px,1fr); gap: 14px; align-items: center; min-width: 0; padding: 14px 16px; border-top: 1px solid #e5eeee; }
.admin-client360-package-head { border-top: 0; background: #f2f7f7; color: #556d7b; }
.admin-client360-package-row select { width: 100%; min-width: 0; min-height: 44px; }
.admin-client360-package-row .admin-client360-reset { grid-column: 3 / 5; justify-self: start; }
.admin-client360-access-on { color: #008b75; }
.admin-client360-access-off { color: #7b5a00; }
.admin-client360-empty { padding: 16px; color: #647985; text-align: center; }
.admin-client360-activity { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.admin-client360-activity li { display: grid; grid-template-columns: minmax(130px,.7fr) minmax(180px,1.5fr) minmax(150px,.7fr); gap: 12px; padding: 13px 4px; border-bottom: 1px solid #e5eeee; }
.admin-client360-activity time { color: #647985; }

/* Client 360 customer-level wallet redesign. */
.admin-client360 { gap: 20px; max-width: 1440px; margin: 0 auto; padding: 0 24px 24px; }
.admin-client360-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-client360-actions .admin-client360-intro { margin-right: auto; }
.admin-client360-actions .admin-button { min-height: 44px; }
.admin-client360-section { padding: 20px; }
.admin-client360-section-heading h3 { font-size: 18px; line-height: 24px; overflow-wrap: anywhere; }
.admin-client360-main-grid > .admin-client360-section:first-child { grid-column: span 5; grid-row: 1; }
.admin-client360-main-grid > .admin-client360-wallet-section { grid-column: 1 / -1; grid-row: 2; }
.admin-client360-main-grid > .admin-client360-section:last-child { grid-column: span 7; grid-row: 1; }
.admin-client360-wallet-provider-grid { display: grid; grid-template-columns: repeat(2,minmax(320px,1fr)); gap: 16px; }
.admin-client360-wallet-provider { display: grid; gap: 10px; min-width: 0; min-height: 104px; padding: 16px; border: 1px solid #dce7e7; border-radius: 12px; }
.admin-client360-wallet-provider-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-client360-wallet-provider-heading h4 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.admin-client360-wallet-provider-heading .admin-status-badge { margin-left: auto; white-space: normal; text-align: right; }
.admin-client360-wallet-logo { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; background: #e4f6f1; color: #007c72; font-weight: 800; }
.admin-client360-wallet-provenance { margin: 0; color: #556d7b; overflow-wrap: anywhere; }
.admin-client360-wallet-details summary, .admin-client360-activity-disclosure { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: #006d65; font-weight: 700; }
.admin-client360-activity-disclosure { width: max-content; max-width: 100%; margin-top: 4px; padding: 8px 0; border: 0; background: transparent; text-align: left; }
.admin-client360-wallet-details summary:focus-visible, .admin-client360-activity-disclosure:focus-visible, .admin-client360 button:focus-visible, .admin-client360 select:focus-visible { outline: 3px solid #147d75; outline-offset: 2px; }
.admin-client360-identity-group { min-width: 0; padding: 0 0 16px; border-bottom: 1px solid #dce7e7; }
.admin-client360-identity-group > h4 { margin: 0 0 12px; overflow-wrap: anywhere; }
.admin-client360-identity-group > h4 small { color: #647985; font-weight: 400; }
.admin-client360-identity-group .admin-client360-evidence-card { padding: 14px 0; border: 0; border-top: 1px solid #e5eeee; border-radius: 0; }
.admin-client360-application-cards { display: none; }
.admin-client360-package-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; min-width: 0; }
.admin-client360-package-name > strong { min-width: 0; overflow-wrap: anywhere; }
.admin-client360-tier-amount { margin: 0; padding: 4px 2px; border: 0; background: transparent; color: #5d7384; font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; cursor: pointer; text-align: left; }
.admin-client360-tier-amount-missing { cursor: default; }
button.admin-client360-tier-amount { min-height: 44px; }
.admin-client360-tier-amount:focus-visible { outline: 3px solid #147d75; outline-offset: 2px; border-radius: 4px; }
.admin-client360-tier-tooltip { position: fixed; z-index: 90; left: 0; top: 0; width: max-content; max-width: min(240px, calc(100 * var(--cw-vw) - 16px)); margin: 0; padding: 10px 12px; overflow: auto; border-radius: 10px; background: #102a43; color: #f7fafc; box-shadow: 0 10px 28px rgba(6, 30, 53, .28); }
.admin-client360-tier-tooltip[hidden] { display: none; }
.admin-client360-tier-tooltip p { margin: 0 0 8px; font-weight: 700; }
.admin-client360-tier-tooltip ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.admin-client360-tier-tooltip li { display: flex; justify-content: space-between; gap: 16px; }
.admin-client360-package-controls { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.admin-client360-package-controls > .admin-cell-stack { flex: 1 1 auto; min-width: 0; }
.admin-client360-package-row .admin-client360-reset { grid-column: auto; justify-self: auto; flex: 0 0 auto; }
.admin-client360-activity-remainder[hidden] { display: none; }
.admin-client360 :is(button,select,summary) { scroll-margin-top: 96px; }

@media (max-width: 1100px) {
  :where(html:not(.cw-desktop-scale)) .admin-client360-toolbar{ align-items: flex-start; flex-wrap: wrap; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-intro{ flex: 1 1 100%; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-main-grid, :where(html:not(.cw-desktop-scale)) .admin-client360-card-grid{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-main-grid > .admin-client360-section:first-child, :where(html:not(.cw-desktop-scale)) .admin-client360-main-grid > .admin-client360-section:last-child{ grid-column: auto; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-kpis{ grid-template-columns: repeat(2,minmax(0,1fr)); }
  :where(html:not(.cw-desktop-scale)) .admin-financial-summary-body{ grid-template-columns: repeat(2,minmax(0,1fr)); }
  :where(html:not(.cw-desktop-scale)) .admin-client360-evidence-grid{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-evidence-actions{ grid-template-columns: repeat(2,minmax(0,1fr)); }
  :where(html:not(.cw-desktop-scale)) .admin-client360-package-name{ flex-direction: column; align-items: flex-start; gap: 2px; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-package-head{ display: none; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-package-row{ grid-template-columns: 1fr; gap: 8px; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-package-row [data-label]::before{ display: block; margin-bottom: 3px; color: #647985; content: attr(data-label); font-size: .75rem; font-weight: 700; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-package-row .admin-client360-reset{ grid-column: 1; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-activity li{ grid-template-columns: 1fr; gap: 4px; }
  :where(html:not(.cw-desktop-scale)) .admin-client360{ padding-inline: 20px; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-actions{ align-items: flex-start; flex-wrap: wrap; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-main-grid > .admin-client360-section:first-child, :where(html:not(.cw-desktop-scale)) .admin-client360-main-grid > .admin-client360-wallet-section, :where(html:not(.cw-desktop-scale)) .admin-client360-main-grid > .admin-client360-section:last-child{ grid-column: auto; grid-row: auto; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-package-controls{ align-items: stretch; flex-direction: column; }
}
@media (max-width: 767px) {
  :where(html:not(.cw-desktop-scale)) .admin-client360{ gap: 16px; padding: 0 16px 16px; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-actions .admin-client360-intro{ flex-basis: 100%; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-actions .admin-button{ flex: 1 1 100%; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-kpis, :where(html:not(.cw-desktop-scale)) .admin-financial-summary-body{ grid-template-columns: repeat(2,minmax(0,1fr)); }
  :where(html:not(.cw-desktop-scale)) .admin-client360-evidence-actions, :where(html:not(.cw-desktop-scale)) .admin-client360-wallet-provider-grid{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-section{ padding: 16px; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-wallet-provider{ min-height: 112px; padding: 14px; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-wallet-logo{ flex-basis: 36px; width: 36px; height: 36px; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-section .admin-table-region{ display: none; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-application-cards{ display: grid; gap: 12px; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-application-card{ display: grid; gap: 12px; min-width: 0; padding: 14px; border: 1px solid #dce7e7; border-radius: 12px; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-application-card h4{ margin: 0; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-application-facts{ display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-application-facts dt{ color: #647985; font-size: 12px; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-application-facts dd{ margin: 3px 0 0; overflow-wrap: anywhere; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-application-card .admin-button{ width: 100%; min-height: 44px; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-section .admin-table tr{ min-width: 0; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-section .admin-table td{ min-width: 0; max-width: 100%; }
  :where(html:not(.cw-desktop-scale)) .admin-client360-evidence-action, :where(html:not(.cw-desktop-scale)) .admin-client360-package-row select, :where(html:not(.cw-desktop-scale)) .admin-client360-reset{ width: 100%; min-height: 44px; }
}
@media (max-width: 359px) {
  :where(html:not(.cw-desktop-scale)) .admin-client360-kpis, :where(html:not(.cw-desktop-scale)) .admin-financial-summary-body{ grid-template-columns: 1fr; }
}
.admin-detail-loading { min-height: calc(60 * var(--cw-vh)); }
.admin-skeleton {
  color: transparent !important;
  background: linear-gradient(90deg, #e8eeee 25%, #f6f9f9 42%, #e8eeee 62%);
  background-size: 240% 100%;
  animation: admin-skeleton-shimmer 1.15s ease-in-out infinite;
}
.admin-skeleton-title { display: block; width: min(360px, calc(72 * var(--cw-vw))); height: 28px; margin: 7px 0 6px !important; border-radius: 8px; }
.admin-skeleton-reference { display: block; width: min(190px, calc(48 * var(--cw-vw))); height: 14px; border-radius: 6px; }
.admin-skeleton-status { display: block; width: 112px; height: 28px; padding: 0; border-radius: 999px; }
.admin-detail-skeleton { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; min-height: calc(60 * var(--cw-vh)); align-content: start; }
.admin-detail-skeleton-card { display: grid; min-height: 170px; padding: 20px; align-content: start; gap: 17px; border: 1px solid #dce7e7; border-radius: 16px; background: #fff; }
.admin-detail-skeleton-card-wide { grid-column: 1 / -1; min-height: 132px; }
.admin-skeleton-heading { display: block; width: 38%; height: 18px; border-radius: 7px; }
.admin-skeleton-line { display: block; width: 72%; height: 13px; border-radius: 6px; }
.admin-skeleton-line-long { width: 92%; }
.admin-skeleton-line-short { width: 48%; }
@keyframes admin-skeleton-shimmer { to { background-position: -240% 0; } }
@media (max-width: 700px) {
  :where(html:not(.cw-desktop-scale)) .admin-detail-skeleton{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-detail-skeleton-card-wide{ grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-skeleton { animation: none; background: #e8eeee; }
}
.admin-detail-alert {
  display: flex;
  margin-bottom: 16px;
  padding: 14px 15px;
  align-items: flex-start;
  gap: 11px;
  color: #35566d;
  border: 1px solid #cfe0ea;
  border-radius: 10px;
  background: #edf6fa;
  font-size: 11px;
  line-height: 1.5;
}

.admin-detail-alert > span {
  display: grid;
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: var(--admin-info);
  font-size: 11px;
  font-weight: 850;
}

.admin-bypass-review-alert {
  display: flex;
  margin-bottom: 16px;
  padding: 16px;
  align-items: flex-start;
  gap: 12px;
  color: #714500;
  border: 2px solid #dda33c;
  border-radius: 11px;
  background: #fff6db;
}

.admin-bypass-review-icon {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: #a96800;
  font-size: 13px;
  font-weight: 900;
}

.admin-bypass-review-alert strong { display: block; margin-bottom: 5px; color: #573500; font-size: 12px; }
.admin-bypass-review-alert p { margin: 0; font-size: 10px; line-height: 1.55; }
.admin-bypass-review-badges { display: flex; margin-top: 10px; gap: 7px; flex-wrap: wrap; }
.admin-bypass-badge {
  display: inline-flex;
  min-height: 25px;
  padding: 0 8px;
  align-items: center;
  color: #6b3f00;
  border: 1px solid #d39a32;
  border-radius: 6px;
  background: #ffe8aa;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
}

.admin-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.admin-detail-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--admin-line);
  border-radius: 11px;
  background: white;
}

.admin-detail-card-wide { grid-column: 1 / -1; }
.admin-detail-card h3 { margin-bottom: 15px; font-size: 14px; letter-spacing: -.015em; }
.admin-detail-list { display: grid; margin: 0; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.admin-detail-list > div { min-width: 0; }
.admin-detail-list .admin-detail-full { grid-column: 1 / -1; }
.admin-detail-list dt { color: var(--admin-muted); font-size: 9px; font-weight: 700; }
.admin-detail-list dd { overflow-wrap: anywhere; margin: 4px 0 0; color: var(--admin-ink); font-size: 11px; font-weight: 700; line-height: 1.45; }

.admin-detail-card-approved {
  border-color: #8ed6ce;
  background: linear-gradient(145deg, #f0fffc 0%, #ffffff 72%);
  box-shadow: inset 4px 0 0 #0c9487;
}

.admin-detail-card-approved h3 { color: #087a70; }
.admin-detail-card-approved .admin-detail-list > div:first-child dd {
  color: #087a70;
  font-size: 18px;
  font-weight: 900;
}

.admin-detail-card-applied {
  border-color: #d5dfe5;
  background: #f9fbfc;
}

.admin-identity-review-card { padding: 0; overflow: hidden; }
.admin-identity-review-title {
  display: flex;
  min-height: 60px;
  padding: 17px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--admin-line);
}

.admin-identity-review-title h3 { margin: 0; }
.admin-attempt-count {
  display: inline-flex;
  min-height: 26px;
  padding: 0 9px;
  align-items: center;
  color: #40566c;
  border: 1px solid var(--admin-line);
  border-radius: 99px;
  background: #f5f8f9;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-human-review-note {
  margin: 16px 18px 0;
  padding: 13px 14px;
  color: #244a66;
  border: 1px solid #c7dce8;
  border-radius: 9px;
  background: #eef7fb;
}

.admin-human-review-note strong { display: block; margin-bottom: 4px; font-size: 11px; }
.admin-human-review-note p { margin: 0; font-size: 10px; line-height: 1.55; }
.admin-media-empty {
  margin: 16px 18px 18px;
  padding: 28px 20px;
  color: var(--admin-muted);
  border: 1px dashed var(--admin-line-dark);
  border-radius: 10px;
  background: #fafcfc;
  text-align: center;
}

.admin-media-empty strong { display: block; margin-bottom: 5px; color: var(--admin-ink); font-size: 12px; }
.admin-media-empty p { max-width: 460px; margin: 0 auto; font-size: 10px; line-height: 1.5; }
.admin-verification-timeline { display: grid; margin: 0; padding: 18px 18px 20px 42px; gap: 18px; list-style: none; }
.admin-verification-timeline-item { position: relative; min-width: 0; }
.admin-verification-timeline-item:not(:last-child)::before {
  position: absolute;
  top: 16px;
  bottom: -26px;
  left: -25px;
  width: 1px;
  content: "";
  background: #b7d4d1;
}

.admin-verification-timeline-dot {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: -30px;
  width: 11px;
  height: 11px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--admin-teal);
  box-shadow: 0 0 0 1px #8ebeb9;
}

.admin-verification-attempt {
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 11px;
  background: #fbfdfd;
}

.admin-verification-attempt-header {
  display: flex;
  min-height: 64px;
  padding: 14px 15px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--admin-line);
  background: white;
}

.admin-verification-attempt-copy { min-width: 0; }
.admin-verification-attempt-copy h4 { margin: 5px 0 0; font-size: 11px; font-weight: 750; }
.admin-verification-badges { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.admin-test-mode-badge,
.admin-test-badge {
  display: inline-flex;
  min-height: 25px;
  padding: 0 8px;
  align-items: center;
  color: #744400;
  border: 1px solid #e4ba62;
  border-radius: 99px;
  background: #fff0c5;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .05em;
  white-space: nowrap;
}

.admin-test-badge { min-height: 21px; padding: 0 7px; }
.admin-test-mode-warning {
  display: grid;
  margin: 13px 15px 0;
  padding: 11px 12px;
  gap: 3px;
  color: #704700;
  border: 1px solid #e7bd68;
  border-radius: 8px;
  background: #fff5d9;
  font-size: 9px;
  line-height: 1.45;
}

.admin-attempt-bypass-badge {
  padding: 5px 8px;
  color: #724600;
  border: 1px solid #dfbd6d;
  border-radius: 99px;
  background: #fff4d7;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .06em;
}

.admin-attempt-bypass-warning {
  display: grid;
  margin: 0 18px 14px;
  padding: 11px 13px;
  gap: 4px;
  color: #6d4300;
  border: 1px solid #e1bc66;
  border-radius: 8px;
  background: #fff7df;
  font-size: 9px;
  line-height: 1.5;
}

.admin-attempt-bypass-warning strong { font-size: 10px; }

.admin-test-mode-warning strong { font-size: 10px; }
.admin-verification-metrics {
  display: grid;
  padding: 14px 15px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.admin-verification-metric {
  display: grid;
  min-width: 0;
  min-height: 64px;
  padding: 11px;
  align-content: center;
  gap: 7px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: white;
}

.admin-verification-metric > small,
.admin-verification-metric-heading small { color: var(--admin-muted); font-size: 8px; font-weight: 750; }
.admin-verification-metric > strong,
.admin-verification-metric-heading strong { color: var(--admin-ink); font-size: 11px; }
.admin-verification-metric-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.admin-score-track { display: block; height: 5px; overflow: hidden; border-radius: 99px; background: #dfe8eb; }
.admin-score-fill { display: block; height: 100%; border-radius: inherit; background: var(--admin-teal); }
.admin-score-unavailable { font-style: italic; }
.admin-media-grid {
  display: grid;
  padding: 0 15px 15px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.admin-media-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  background: white;
}

.admin-media-heading { display: flex; min-height: 42px; padding: 10px; align-items: center; justify-content: space-between; gap: 7px; }
.admin-media-heading h5 { margin: 0; font-size: 14px; line-height: 1.35; }
.admin-media-frame { display: grid; aspect-ratio: 9 / 16; overflow: hidden; place-items: center; background: #071b2c; }
.admin-review-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #071b2c; }
/* item 296: a tall recording (e.g. 720x1600) must never size the inline player past the
   9:16 frame - .admin-media-frame clips overflow, which hid the controls bar. Pin the
   player to the frame box and letterbox the picture instead. Display only. */
.admin-media-frame { position: relative; grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.admin-media-frame > .admin-review-video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.admin-photo-frame { position: relative; aspect-ratio: 9 / 16; background: #071b2c; }
.admin-review-photo { display: block; width: 100%; height: 100%; object-fit: contain; background: #e8eff1; }
.admin-photo-guide { position: absolute; z-index: 2; top: 37.35%; left: 12%; display: grid; width: 76%; aspect-ratio: 1.586 / 1; place-items: start center; border: 2px solid #27c3a7; border-radius: 8px; box-shadow: 0 0 0 999px rgba(3,18,11,.12); pointer-events: none; }
.admin-photo-guide span { transform: translateY(-50%); padding: 4px 7px; border-radius: 999px; color: #fff; background: #078f80; font-size: 11px; font-weight: 800; white-space: nowrap; }
.admin-media-placeholder {
  display: grid;
  min-height: 142px;
  padding: 15px;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: #748394;
  background: #f2f5f6;
  text-align: center;
}

.admin-media-placeholder-icon {
  display: grid;
  width: 25px;
  height: 25px;
  margin-bottom: 3px;
  place-items: center;
  color: #65788a;
  border: 1px solid #bdc9cf;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
}

.admin-media-placeholder strong { color: #40566c; font-size: 13px; }
.admin-media-placeholder small { font-size: 12px; line-height: 1.4; }
.admin-media-load-error { width: 100%; min-height: 100%; }
.admin-media-metadata { display: flex; min-height: 34px; padding: 8px 10px; align-items: center; gap: 7px; border-top: 1px solid var(--admin-line); flex-wrap: wrap; }
.admin-media-metadata span { color: var(--admin-muted); font-size: 12px; }
.admin-media-metadata span:not(:last-child)::after { margin-left: 7px; content: "\00b7"; }
.admin-media-help { min-height: 58px; margin: 0; padding: 0 10px 10px; color: var(--admin-muted); font-size: 12px; line-height: 1.45; }
.admin-media-frame-interactive { cursor: zoom-in; }
.admin-media-frame-interactive:focus-visible { outline: 4px solid #30cfbb; outline-offset: -4px; }
.admin-media-actions { display: flex; padding: 10px; align-items: center; gap: 8px; border-top: 1px solid var(--admin-line); flex-wrap: wrap; }
.admin-media-actions .admin-button { flex: 1 1 120px; min-height: 38px; }
.admin-media-viewer { width: calc(100 * var(--cw-vw)); max-width: none; height: calc(100 * var(--cw-dvh)); max-height: none; margin: 0; padding: 0; border: 0; background: #061521; color: white; }
.admin-media-viewer::backdrop { background: rgba(0, 10, 17, .88); }
.admin-media-viewer-shell { display: grid; width: 100%; height: 100%; grid-template-rows: auto minmax(0, 1fr) auto; }
.admin-media-viewer-header { display: flex; padding: 14px clamp(14px, calc(3 * var(--cw-vw)), 28px); align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(255,255,255,.16); background: #0a2436; }
.admin-media-viewer-header h2 { margin: 4px 0 0; color: white; font-size: clamp(17px, calc(2.5 * var(--cw-vw)), 25px); }
.admin-media-viewer-header .admin-icon-button { color: white; border-color: rgba(255,255,255,.35); }
.admin-media-viewer-body { display: grid; min-height: 0; overflow: auto; place-items: center; padding: clamp(10px, calc(2 * var(--cw-vw)), 24px); }
.admin-media-viewer-image,
.admin-media-viewer-video { display: block; max-width: 100%; max-height: 100%; object-fit: contain; background: #02090f; }
.admin-media-viewer-actions { display: flex; min-height: 72px; padding: 12px clamp(14px, calc(3 * var(--cw-vw)), 28px); align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid rgba(255,255,255,.16); background: #0a2436; }
.admin-media-viewer-actions p { margin: 0 auto 0 0; color: #cae1e7; font-size: 12px; }
.admin-customer-safe-reason { min-width: 180px; max-width: 320px; color: #71322e; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.admin-queue-risk { position: relative; display: grid; min-width: 100px; padding: 8px 9px 8px 34px; border-radius: 8px; border: 1px solid #c9d9de; background: #f5f9fa; }
.admin-queue-risk-icon { position: absolute; top: 9px; left: 9px; display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: #dbe9ec; color: #294f5c; font-size: 11px; font-weight: 900; }
.admin-queue-risk-low { border-color: #acd9c9; background: #ecf9f4; color: #11634f; }
.admin-queue-risk-medium { border-color: #e4c66c; background: #fff8dc; color: #6d4c00; }
.admin-queue-risk-high { border-color: #e1a16d; background: #fff0e4; color: #883d0d; }
.admin-queue-risk-critical,
.admin-queue-risk-blocked { border-color: #db8c89; background: #fff0ef; color: #8d2925; }
.admin-queue-risk-high .admin-queue-risk-icon,
.admin-queue-risk-critical .admin-queue-risk-icon,
.admin-queue-risk-blocked .admin-queue-risk-icon { background: currentColor; color: white; }

@media (max-width: 640px) {
  :where(html:not(.cw-desktop-scale)) .admin-media-viewer-actions{ align-items: stretch; flex-direction: column; }
  :where(html:not(.cw-desktop-scale)) .admin-media-viewer-actions p{ width: 100%; margin: 0 0 3px; }
  :where(html:not(.cw-desktop-scale)) .admin-media-viewer-actions .admin-button{ width: 100%; }
  :where(html:not(.cw-desktop-scale)) .admin-media-viewer-body{ padding: 8px; }
}

.admin-payslip-review-card { padding: 0; overflow: hidden; }
.admin-payslip-review-heading {
  display: flex;
  min-height: 72px;
  padding: 17px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--admin-line);
}

.admin-payslip-review-heading h3 { margin: 0 0 5px; }
.admin-payslip-review-heading p { margin: 0; color: var(--admin-muted); font-size: 9px; line-height: 1.45; }
.admin-payslip-list { display: grid; padding: 16px 18px 18px; gap: 12px; }
.admin-payslip-item {
  display: grid;
  min-width: 0;
  padding: 13px;
  align-items: center;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  background: #fbfdfd;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.admin-payslip-copy { min-width: 0; }
.admin-payslip-title-row { display: flex; align-items: center; gap: 8px; }
.admin-payslip-title-row h4 { overflow: hidden; margin: 0; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-current-document-badge {
  display: inline-flex;
  min-height: 20px;
  padding: 0 6px;
  align-items: center;
  color: var(--admin-success);
  border-radius: 5px;
  background: var(--admin-success-bg);
  font-size: 7px;
  font-weight: 900;
}

.admin-payslip-copy > p { margin: 5px 0 0; color: var(--admin-muted); font-size: 8px; line-height: 1.45; }
.admin-payslip-preview {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 340px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #eef2f3;
}

.admin-payslip-preview img { display: block; width: 100%; max-height: 338px; object-fit: contain; }
.admin-payslip-open { min-height: 36px; padding: 0 12px; text-decoration: none; }
.admin-payslip-unavailable { margin: 0; color: var(--admin-muted); font-size: 9px; }

.admin-audit-list { display: grid; margin: 0; padding: 0; gap: 0; list-style: none; }
.admin-audit-item { position: relative; display: grid; min-height: 67px; padding: 0 0 18px 31px; gap: 4px; }
.admin-audit-item:not(:last-child)::before { position: absolute; top: 17px; bottom: 0; left: 8px; width: 1px; content: ""; background: var(--admin-line); }
.admin-audit-dot { position: absolute; top: 3px; left: 2px; width: 13px; height: 13px; border: 3px solid white; border-radius: 50%; background: var(--admin-teal); box-shadow: 0 0 0 1px #9dc9c5; }
.admin-audit-item strong { font-size: 11px; }
.admin-audit-item small { color: var(--admin-muted); font-size: 9px; line-height: 1.45; }
.admin-audit-note { margin: 2px 0 0; color: #40566c; font-size: 10px; line-height: 1.5; }

.admin-decision-footer,
.admin-terminal-footer {
  display: flex;
  min-height: 84px;
  padding: 15px 28px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--admin-line);
  background: white;
  box-shadow: 0 -8px 25px rgba(3, 23, 42, .06);
}

.admin-decision-footer p { display: grid; margin: 0; gap: 3px; }
.admin-decision-footer p strong { font-size: 11px; }
.admin-decision-footer p small { color: var(--admin-muted); font-size: 9px; }
.admin-decision-footer > div { display: flex; flex: 0 0 auto; gap: 9px; }
.admin-terminal-footer { justify-content: flex-start; color: #40566c; font-size: 11px; line-height: 1.5; }

.admin-dialog {
  width: min(470px, calc(100% - 30px));
  padding: 0;
  color: var(--admin-ink);
  border: 0;
  border-radius: 14px;
  background: white;
  box-shadow: var(--admin-shadow);
}
.admin-dialog-wide { width: min(650px, calc(100% - 30px)); }
.admin-dialog-field-grid {
  display: grid;
  margin-bottom: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.admin-dialog-field-grid .admin-field + .admin-field { margin-top: 0; }
.admin-repayment-loan-control { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: stretch; }
.admin-repayment-loan-control .admin-button { min-height: 44px; white-space: nowrap; }
.admin-field-feedback { display: block; min-height: 1.4em; margin-top: 5px; color: var(--admin-muted); font-size: 10px; font-weight: 700; }
.admin-dialog-field-wide { grid-column: 1 / -1; }
.admin-dialog-icon-user { color: var(--admin-teal); background: var(--admin-ice); }
.admin-dialog input[readonly] { color: #536777; background: #f3f6f7; cursor: default; }

.admin-dialog::backdrop { background: rgba(3, 23, 42, .58); backdrop-filter: blur(2px); }
.admin-dialog form { padding: 28px; }
.admin-dialog-confirmation { padding: 30px; text-align: center; }
.admin-dialog-confirmation-form { padding: 0 !important; text-align: center; }
.admin-dialog-confirmation .admin-dialog-icon { margin: 0 auto 17px; }
.admin-dialog-confirmation .admin-dialog-actions { justify-content: center; }
.admin-dialog-confirmation p { margin: 0 auto; max-width: 34rem; color: var(--admin-muted); line-height: 1.6; }
.admin-dialog-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 17px;
  place-items: center;
  border-radius: 12px;
}

.admin-dialog-icon-approved { color: var(--admin-success); background: var(--admin-success-bg); }
.admin-dialog-icon-disapproved { color: var(--admin-danger); background: var(--admin-danger-bg); }

.admin-priority-good .admin-classification-good::before{content:"\2713";margin-right:.35rem;font-weight:800}.admin-classification-good{color:#11684d;background:#e0f5eb;border-color:#9fd9c3}
/* Item 294: the SUSPENDED customer-history classification badge reads in a
   clearly-dark red (#8B0000) bold, so "Suspended" is its own at-a-glance triage
   signal in the admin application lists (All + Pending, shared builder). Kept
   distinct from the solid light-red DISAPP status pill (var(--admin-danger-bg)
   fill) and the faint pink suspended-row tint by using the darker ink over a
   near-white red-tinted chip with its own border; mirrors the .admin-classification-good
   colour+tint+border pattern. Readable over both the pink and green row tints. Display only. */
/* item 294 follow-up: Suspended is plain dark-red BOLD TEXT (no pill fill, no border, no
   leading status dot) for legibility over both the pink and green row tints. */
.admin-classification-suspended,.admin-status-badge.admin-classification-suspended{color:#b4231f;background:transparent;border-color:transparent;box-shadow:none;font-weight:800;padding:0}
.admin-classification-suspended::before,.admin-status-badge.admin-classification-suspended::before{display:none}
.admin-number{font-variant-numeric:tabular-nums;font-weight:700;text-align:center}
.admin-pending-qualification-green td:not(:last-child){background:#eefaf4}.admin-pending-qualification-green td:first-child{box-shadow:inset 4px 0 #16835f}.admin-pending-qualification-green:hover td:not(:last-child){background:#e3f6ed}
.admin-pending-qualification-yellow td:not(:last-child){background:#fffde2}.admin-pending-qualification-yellow td:first-child{box-shadow:inset 4px 0 #d4a21b}.admin-pending-qualification-yellow:hover td:not(:last-child){background:#fff8c9}
.admin-pending-qualification-blue td{background:#e9f3ff}.admin-pending-qualification-blue td:first-child{box-shadow:inset 4px 0 #2f73c8}.admin-pending-qualification-blue:hover td{background:#dcecff}
.admin-pending-qualification-red td:not(:last-child){background:#fdecec}.admin-pending-qualification-red td:first-child{box-shadow:inset 4px 0 #c0392b}.admin-pending-qualification-red:hover td:not(:last-child){background:#fbdddd}
.admin-pending-qualification-grey td:not(:last-child){background:#eef1f4}.admin-pending-qualification-grey td:first-child{box-shadow:inset 4px 0 #6b7684}.admin-pending-qualification-grey:hover td:not(:last-child){background:#e3e8ed}
.admin-bulk-grey-overlay{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;background:rgba(3,23,42,.45);padding:16px}
.admin-bulk-grey-card{background:#fff;border-radius:10px;box-shadow:0 12px 40px rgba(3,23,42,.3);max-width:520px;width:100%;max-height:calc(80 * var(--cw-vh));display:flex;flex-direction:column;padding:20px 22px}
.admin-bulk-grey-title{margin:0 0 10px;font-size:17px;font-weight:700;color:#03172a}
.admin-bulk-grey-body{overflow:auto;font-size:14px;color:#1c2b3a;margin-bottom:16px}
.admin-bulk-grey-count{font-weight:600;margin:0 0 6px}
.admin-bulk-grey-reason{margin:0 0 10px;color:#4a5a6a}
.admin-bulk-grey-list{margin:0;padding-left:18px;max-height:calc(40 * var(--cw-vh));overflow:auto;list-style:disc}
.admin-bulk-grey-list li{margin:2px 0}
.admin-bulk-grey-empty,.admin-bulk-grey-error{color:#4a5a6a}
.admin-bulk-grey-error{color:#c0392b}
.admin-bulk-grey-actions{display:flex;gap:10px;justify-content:flex-end}
.admin-readiness-indicator{display:inline-grid;width:17px;height:17px;margin-right:6px;place-items:center;border:2px solid #fff;vertical-align:middle;box-shadow:0 0 0 1px rgba(3,23,42,.25);color:#fff;font-size:11px;font-weight:900;line-height:1}
.admin-readiness-green{border-radius:50%;background:#16835f}.admin-readiness-yellow{border-radius:3px;background:#9a6800}
.admin-dialog-icon-warning { color: #8b5900; background: var(--admin-warning-bg); font-size: 20px; font-weight: 900; }
.admin-dialog h2 { margin-bottom: 8px; font-size: 20px; letter-spacing: -.03em; }
.admin-dialog > form > p:not(.admin-form-error) { margin-bottom: 20px; color: var(--admin-muted); font-size: 11px; line-height: 1.55; }
.admin-dialog-warning {
  margin: -7px 0 18px;
  padding: 11px 12px;
  color: #714500;
  border: 1px solid #e2bd67;
  border-radius: 8px;
  background: #fff5d9;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
}
.admin-dialog .admin-field + .admin-field { margin-top: 15px; }
.admin-dialog .admin-form-error { margin-top: 12px; }
.admin-dialog-actions { display: flex; margin-top: 19px; justify-content: flex-end; gap: 9px; }

/* Item 103: keep every repayment field reachable above the mobile action row. */
#recordRepaymentDialog { max-height: calc(calc(100 * var(--cw-dvh)) - 24px); overflow: hidden; }
#recordRepaymentForm { max-height: calc(calc(100 * var(--cw-dvh)) - 24px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#recordRepaymentDialog .admin-dialog-actions { position: sticky; z-index: 2; bottom: -23px; margin-inline: -18px; margin-bottom: -23px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--admin-line); background: white; }
.admin-repayment-gateway-warning {
  display: flex;
  min-height: 44px;
  margin: 0 0 18px;
  padding: 11px 12px;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #e2bd67;
  border-radius: 9px;
  background: #fff5d9;
  color: #714500;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}
.admin-repayment-gateway-warning.admin-hidden { display: none; }
.admin-repayment-gateway-warning > input[type="checkbox"] {
  appearance: auto;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 1px 0 0;
  padding: 0;
  flex: 0 0 20px;
  accent-color: var(--admin-teal);
  cursor: pointer;
}
.admin-repayment-gateway-warning > input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(7, 139, 128, .35);
  outline-offset: 2px;
}
.admin-repayment-gateway-warning > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.admin-repayment-voucher { display: grid; gap: 12px; margin-bottom: 18px; padding: 14px; border: 1px solid #cfe1df; border-radius: 12px; background: #f3fbf9; }
.admin-repayment-voucher.admin-hidden { display: none; }
.admin-repayment-voucher > div { display: grid; gap: 3px; }
.admin-repayment-voucher > div span { color: var(--admin-muted); font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.admin-repayment-voucher > label { display: flex; min-height: 44px; align-items: center; gap: 9px; font-weight: 800; }
.admin-repayment-voucher > label input { width: 18px; height: 18px; accent-color: var(--admin-teal); }
.admin-repayment-voucher dl { display: grid; margin: 0; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.admin-repayment-voucher dl div { min-width: 0; padding: 9px; border-radius: 8px; background: white; }
.admin-repayment-voucher dt { color: var(--admin-muted); font-size: 9px; font-weight: 800; }
.admin-repayment-voucher dd { margin: 4px 0 0; font-weight: 900; overflow-wrap: anywhere; }
.admin-repayment-voucher > p { min-height: 1.4em; margin: 0; color: var(--admin-success); font-size: 11px; font-weight: 800; }

.admin-toast-region {
  position: fixed;
  z-index: 110;
  top: 18px;
  right: 18px;
  display: grid;
  width: min(370px, calc(100% - 36px));
  gap: 9px;
  pointer-events: none;
}

.admin-toast {
  display: flex;
  padding: 13px 15px;
  align-items: flex-start;
  gap: 10px;
  color: #24483a;
  border: 1px solid #abd4c0;
  border-radius: 9px;
  background: #effaf4;
  box-shadow: 0 12px 28px rgba(3, 23, 42, .16);
  font-size: 11px;
  line-height: 1.5;
  animation: admin-toast-in .18s ease-out;
}

.admin-toast-error { color: var(--admin-danger); border-color: #e7b9b6; background: #fff3f2; }
.admin-toast > span:first-child { font-weight: 900; }
@keyframes admin-toast-in { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 1320px) {
  :where(html:not(.cw-desktop-scale)) .admin-list-header:has(#filterForm){ align-items: flex-start; flex-direction: column; }
  :where(html:not(.cw-desktop-scale)) #filterForm{ width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  :where(html:not(.cw-desktop-scale)) .admin-summary-grid{ grid-template-columns: 1fr 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-test-settings-grid{ grid-template-columns: 1fr 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-test-setting-card:first-child{ grid-column: 1 / -1; }
  :where(html:not(.cw-desktop-scale)) .admin-list-header{ align-items: flex-start; flex-direction: column; }
  :where(html:not(.cw-desktop-scale)) .admin-filters{ width: 100%; }
  :where(html:not(.cw-desktop-scale)) #filterForm{grid-template-columns:repeat(2,minmax(0,1fr))}
  :where(html:not(.cw-desktop-scale)) .admin-search-field{ width: auto; flex: 1; }
  :where(html:not(.cw-desktop-scale)) .admin-detail-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1040px) {
  :where(html:not(.cw-desktop-scale)) .admin-auth-view{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-auth-aside{ display: none; }
  :where(html:not(.cw-desktop-scale)) .admin-auth-panel{ width: min(100%, 560px); }
  :where(html:not(.cw-desktop-scale)) .admin-sidebar{ transform: translateX(-100%); transition: transform .2s ease; }
  :where(html:not(.cw-desktop-scale)) .admin-portal.admin-sidebar-open .admin-sidebar{ transform: translateX(0); }
  :where(html:not(.cw-desktop-scale)) .admin-main{ margin-left: 0; }
  :where(html:not(.cw-desktop-scale)) .admin-mobile-menu{ display: grid; }
  :where(html:not(.cw-desktop-scale)) .admin-topbar{ padding-right: 22px; padding-left: 22px; }
  :where(html:not(.cw-desktop-scale)) .admin-content{ padding-right: 22px; padding-left: 22px; }
}

@media (max-width: 700px) {
  :where(html:not(.cw-desktop-scale)) .admin-auth-panel{ padding: 88px 22px 34px; justify-content: flex-start; }
  :where(html:not(.cw-desktop-scale)) .admin-auth-brand{ top: 27px; }
  :where(html:not(.cw-desktop-scale)) .admin-auth-copy{ margin-top: 34px; }
  :where(html:not(.cw-desktop-scale)) .admin-topbar{ min-height: 72px; }
  :where(html:not(.cw-desktop-scale)) .admin-topbar-actions{ gap: 7px; }
  :where(html:not(.cw-desktop-scale)) .admin-language-control-topbar .admin-language-select{ min-width: 104px; max-width: 118px; }
  :where(html:not(.cw-desktop-scale)) .admin-topbar-copy .admin-eyebrow, :where(html:not(.cw-desktop-scale)) .admin-environment-badge{ display: none; }
  :where(html:not(.cw-desktop-scale)) .admin-topbar-copy h1{ margin: 0; font-size: 18px; }
  :where(html:not(.cw-desktop-scale)) .admin-content{ padding: 26px 14px 48px; }
  :where(html:not(.cw-desktop-scale)) .admin-section-heading{ align-items: flex-start; flex-direction: column; gap: 8px; }
  :where(html:not(.cw-desktop-scale)) .admin-section-heading > .admin-button{ width: 100%; }
  :where(html:not(.cw-desktop-scale)) .admin-loan-setting-heading{ align-items: start; grid-template-columns: auto minmax(0, 1fr); }
  :where(html:not(.cw-desktop-scale)) .admin-loan-setting-heading .admin-setting-switch{ grid-column: 1 / -1; margin-top: 3px; }
  :where(html:not(.cw-desktop-scale)) .admin-hierarchy-panel{ grid-template-columns: 1fr; gap: 12px; }
  :where(html:not(.cw-desktop-scale)) .admin-hierarchy-panel > div + div{ padding: 12px 0 0; border-top: 1px solid var(--admin-line); border-left: 0; }
  :where(html:not(.cw-desktop-scale)) .admin-summary-grid{ grid-template-columns: 1fr 1fr; gap: 9px; }
  :where(html:not(.cw-desktop-scale)) .admin-summary-card{ min-height: 88px; padding: 14px; gap: 10px; }
  :where(html:not(.cw-desktop-scale)) .admin-summary-icon{ width: 36px; height: 36px; }
  :where(html:not(.cw-desktop-scale)) .admin-summary-card strong{ font-size: 22px; }
  :where(html:not(.cw-desktop-scale)) .admin-summary-card small{ font-size: 9px; }
  :where(html:not(.cw-desktop-scale)) .admin-list-header{ padding: 18px 14px; }
  :where(html:not(.cw-desktop-scale)) .admin-filters{ align-items: stretch; flex-direction: column; }
  :where(html:not(.cw-desktop-scale)) #filterForm{grid-template-columns:minmax(0,1fr)}
  :where(html:not(.cw-desktop-scale)) #filterForm .admin-filter-actions{display:grid;grid-template-columns:minmax(0,1fr)}
  :where(html:not(.cw-desktop-scale)) #filterForm .admin-filter-actions .admin-button{width:100%}
  :where(html:not(.cw-desktop-scale)) .admin-search-field, :where(html:not(.cw-desktop-scale)) .admin-filter-field select, :where(html:not(.cw-desktop-scale)) .admin-filter-button{ width: 100%; }
  :where(html:not(.cw-desktop-scale)) .admin-table-region{ padding: 0 10px 10px; overflow: visible; }
  :where(html:not(.cw-desktop-scale)) .admin-table, :where(html:not(.cw-desktop-scale)) .admin-table tbody{ display: block; width: 100%; }
  :where(html:not(.cw-desktop-scale)) .admin-table thead{
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  :where(html:not(.cw-desktop-scale)) .admin-table tr{
    display: grid;
    margin: 10px 0 0;
    padding: 14px;
    border: 1px solid var(--admin-line);
    border-radius: 10px;
    background: white;
    grid-template-columns: 1fr auto;
    gap: 11px 14px;
  }
  :where(html:not(.cw-desktop-scale)) .admin-table td{ display: block; padding: 0; border: 0; }
  :where(html:not(.cw-desktop-scale)) .admin-table td::before{
    display: block;
    margin-bottom: 3px;
    content: attr(data-label);
    color: var(--admin-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
  }
  :where(html:not(.cw-desktop-scale)) .admin-table td:first-child{ grid-column: 1 / -1; padding-bottom: 11px; border-bottom: 1px solid var(--admin-line); }
  :where(html:not(.cw-desktop-scale)) .admin-table td:first-child::before, :where(html:not(.cw-desktop-scale)) /* .115: on narrow screens drop the two least-essential pending columns —
     S/D and Employer — remapped from the old nth-child(4)/(6) to width classes. */
  .admin-application-table td.admin-col-record, :where(html:not(.cw-desktop-scale)) .admin-application-table td.admin-col-employer{ display: none; }
  :where(html:not(.cw-desktop-scale)) .admin-table td:last-child{ display: flex; grid-column: 1 / -1; }
  :where(html:not(.cw-desktop-scale)) .admin-fpg-reconciliation-table{ min-width: 0; }
  :where(html:not(.cw-desktop-scale)) .admin-fpg-reconciliation-action{ width: 100%; min-width: 0; }
  :where(html:not(.cw-desktop-scale)) .admin-table td:last-child::before{ display: none; }
  :where(html:not(.cw-desktop-scale)) .admin-permission-region{ padding: 0; overflow-x: auto; }
  :where(html:not(.cw-desktop-scale)) .admin-permission-table{ display: table; width: 100%; min-width: 720px; }
  :where(html:not(.cw-desktop-scale)) .admin-permission-table thead{ position: static; display: table-header-group; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
  :where(html:not(.cw-desktop-scale)) .admin-permission-table tbody{ display: table-row-group; width: auto; }
  :where(html:not(.cw-desktop-scale)) .admin-permission-table tr{ display: table-row; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
  :where(html:not(.cw-desktop-scale)) .admin-permission-table th, :where(html:not(.cw-desktop-scale)) .admin-permission-table td{ display: table-cell; padding: 12px 10px; border-bottom: 1px solid #e7edf0; }
  :where(html:not(.cw-desktop-scale)) .admin-permission-table td:first-child{ padding: 12px 10px; border-bottom: 1px solid #e7edf0; grid-column: auto; }
  :where(html:not(.cw-desktop-scale)) .admin-permission-table td:last-child{ display: table-cell; grid-column: auto; }
  :where(html:not(.cw-desktop-scale)) .admin-permission-table td::before{ display: none; }
  :where(html:not(.cw-desktop-scale)) .admin-list-actions{ align-items: stretch; flex-direction: column; gap: 10px; }
  :where(html:not(.cw-desktop-scale)) .admin-list-actions .admin-button{ width: 100%; }
  :where(html:not(.cw-desktop-scale)) .admin-view-button{ width: 100%; }
  :where(html:not(.cw-desktop-scale)) .admin-message-preview{ min-width: 0; max-width: none; }
  :where(html:not(.cw-desktop-scale)) .admin-message-preview-text{ max-height: calc(1.45em * 3); -webkit-line-clamp: 3; }
  :where(html:not(.cw-desktop-scale)) .admin-customer-cell{ min-width: 0; }
  :where(html:not(.cw-desktop-scale)) .admin-pagination{ padding: 12px 14px; justify-content: space-between; gap: 8px; }
  :where(html:not(.cw-desktop-scale)) .admin-detail-drawer{
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    border: 0;
    border-radius: 0;
  }
  :where(html:not(.cw-desktop-scale)) .admin-drawer-header{ padding: 19px 16px 14px; }
  :where(html:not(.cw-desktop-scale)) .admin-drawer-body{ padding: 16px 14px 28px; }
  :where(html:not(.cw-desktop-scale)) .admin-detail-grid{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-detail-card-wide{ grid-column: auto; }
  :where(html:not(.cw-desktop-scale)) .admin-detail-list{ grid-template-columns: 1fr 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-verification-metrics, :where(html:not(.cw-desktop-scale)) .admin-media-grid{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-media-frame{ aspect-ratio: 9 / 16; }
  :where(html:not(.cw-desktop-scale)) .admin-photo-frame{ aspect-ratio: 9 / 16; }
  :where(html:not(.cw-desktop-scale)) .admin-media-help{ min-height: auto; }
  :where(html:not(.cw-desktop-scale)) .admin-test-settings-grid{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-test-setting-card:first-child{ grid-column: auto; }
  :where(html:not(.cw-desktop-scale)) .admin-test-setting-card{ min-height: 230px; }
  :where(html:not(.cw-desktop-scale)) .admin-test-global-warning{ padding: 14px; }
  :where(html:not(.cw-desktop-scale)) .admin-payslip-item{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-payslip-open{ width: 100%; }
  :where(html:not(.cw-desktop-scale)) .admin-decision-footer{ padding: 13px 14px calc(13px + env(safe-area-inset-bottom)); align-items: stretch; flex-direction: column; }
  :where(html:not(.cw-desktop-scale)) .admin-decision-footer > p{ display: none; }
  :where(html:not(.cw-desktop-scale)) .admin-decision-footer > div{ display: grid; grid-template-columns: 1fr 1.15fr; }
  :where(html:not(.cw-desktop-scale)) .admin-terminal-footer{ padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
  :where(html:not(.cw-desktop-scale)) .admin-dialog form{ padding: 23px 18px; }
  :where(html:not(.cw-desktop-scale)) .admin-dialog-field-grid{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-repayment-loan-control{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-repayment-loan-control .admin-button{ width: 100%; }
  :where(html:not(.cw-desktop-scale)) .admin-dialog-field-wide{ grid-column: auto; }
  :where(html:not(.cw-desktop-scale)) .admin-dialog-actions{ align-items: stretch; flex-direction: column-reverse; }
  :where(html:not(.cw-desktop-scale)) .admin-dialog-actions .admin-button{ width: 100%; }
  :where(html:not(.cw-desktop-scale)) .admin-repayment-voucher dl{ grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  :where(html:not(.cw-desktop-scale)) .admin-topbar{ display: grid; min-height: 104px; padding: 12px 14px; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 7px 10px; }
  :where(html:not(.cw-desktop-scale)) .admin-mobile-menu{ grid-column: 1; grid-row: 1; }
  :where(html:not(.cw-desktop-scale)) .admin-topbar-copy{ min-width: 0; grid-column: 2; grid-row: 1; }
  :where(html:not(.cw-desktop-scale)) .admin-topbar-copy h1{ overflow: visible; font-size: 16px; line-height: 1.2; text-overflow: clip; white-space: normal; }
  :where(html:not(.cw-desktop-scale)) .admin-topbar-actions{ width: 100%; margin-left: 0; grid-column: 1 / -1; grid-row: 2; justify-content: flex-end; }
  :where(html:not(.cw-desktop-scale)) .admin-language-control-topbar{ min-width: 0; }
  :where(html:not(.cw-desktop-scale)) .admin-language-control-topbar .admin-language-select{ width: 112px; min-width: 0; max-width: 112px; }
}

@media (max-width: 430px) {
  :where(html:not(.cw-desktop-scale)) .admin-auth-brand .admin-brand-tag{ display: none; }
  :where(html:not(.cw-desktop-scale)) .admin-auth-brand{ right: 22px; left: 22px; justify-content: space-between; }
  :where(html:not(.cw-desktop-scale)) .admin-auth-brand .admin-language-select{ min-width: 112px; max-width: 118px; }
  :where(html:not(.cw-desktop-scale)) .admin-summary-grid{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-summary-card{ min-height: 76px; }
  :where(html:not(.cw-desktop-scale)) .admin-detail-list{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-detail-list .admin-detail-full{ grid-column: auto; }
  :where(html:not(.cw-desktop-scale)) .admin-drawer-title-row h2{ font-size: 20px; }
  :where(html:not(.cw-desktop-scale)) .admin-client-portal-button{ width: 44px; min-width: 44px; height: 44px; padding: 0; justify-content: center; }
  :where(html:not(.cw-desktop-scale)) .admin-client-portal-label{ position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  :where(html:not(.cw-desktop-scale)) .admin-drawer-meta{ align-items: flex-start; flex-direction: column; }
  :where(html:not(.cw-desktop-scale)) .admin-identity-review-title, :where(html:not(.cw-desktop-scale)) .admin-verification-attempt-header{ align-items: flex-start; flex-direction: column; }
  :where(html:not(.cw-desktop-scale)) .admin-verification-badges{ justify-content: flex-start; }
  :where(html:not(.cw-desktop-scale)) .admin-verification-timeline{ padding-right: 12px; padding-left: 35px; }
}

/* Staging .169 remediation: bounded Payment Alerts filters and compact charge actions. */
.admin-payment-alert-filters { padding: 0 18px 18px; flex-wrap: wrap; }
.admin-payment-alert-filters .admin-filter-field { min-width: 145px; }
.package-report-summary .admin-summary-card strong { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  :where(html:not(.cw-desktop-scale)) .admin-payment-alert-filters{ display: grid; grid-template-columns: 1fr; padding: 0 14px 16px; }
  :where(html:not(.cw-desktop-scale)) #badDebtActionDialog{ max-height: calc(calc(100 * var(--cw-dvh)) - 20px); overflow: hidden; }
  :where(html:not(.cw-desktop-scale)) #badDebtActionForm{ max-height: calc(calc(100 * var(--cw-dvh)) - 20px); padding: 18px; overflow-y: auto; overscroll-behavior: contain; }
  :where(html:not(.cw-desktop-scale)) #badDebtActionDialog .admin-dialog-actions{ display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  :where(html:not(.cw-desktop-scale)) #badDebtActionDialog .admin-dialog-actions .admin-button{ width: 100%; min-height: 44px; height: auto; padding: 9px 12px; }
}
@media (max-width: 430px) {
  :where(html:not(.cw-desktop-scale)) .package-report-summary .admin-summary-card{ min-width: 0; }
  :where(html:not(.cw-desktop-scale)) .package-report-summary .admin-summary-card strong{ font-size: clamp(18px, calc(5.5 * var(--cw-vw)), 22px); letter-spacing: -.025em; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-spinner { animation-duration: 1.8s; }
  .admin-toast { animation: none; }
  .admin-sidebar,
  .admin-button { transition: none; }
}
.admin-test-outcome-options { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .9rem 0; }
.admin-test-outcome-option { border: 1px solid #cbd5df; border-radius: .65rem; background: #fff; color: #334155; padding: .7rem .8rem; font: inherit; font-weight: 700; cursor: pointer; }
.admin-test-outcome-option:hover:not(:disabled) { border-color: #168779; }
.admin-test-outcome-option-selected { border-color: #168779; background: #e7f7f4; color: #0d6f64; box-shadow: 0 0 0 1px #168779; }
.admin-test-outcome-option[data-setting-enabled="false"].admin-test-outcome-option-selected { border-color: #c2413b; background: #fff0ef; color: #a5322d; box-shadow: 0 0 0 1px #c2413b; }
.admin-test-outcome-option:disabled { cursor: not-allowed; opacity: .6; }
.admin-approval-mobile-step{display:none;width:100%;margin:0 0 16px;padding:12px;border:1px solid #cadbe2;border-radius:12px;background:#fff;color:#102b43;font:inherit}
.admin-approval-review-shell{display:grid;grid-template-columns:250px minmax(0,1fr);gap:24px;align-items:start}
.admin-approval-review-steps{position:sticky;top:0;display:grid;gap:8px}
.admin-approval-review-steps button{display:flex;gap:12px;align-items:flex-start;width:100%;padding:15px;border:1px solid transparent;border-radius:14px;background:transparent;color:#526b78;text-align:left;cursor:pointer}
.admin-approval-review-steps button:hover,.admin-approval-review-steps button.active{border-color:#b8ddd7;background:#eef9f7;color:#073f3a}
.admin-approval-review-steps i{display:grid;place-items:center;flex:0 0 30px;height:30px;border-radius:50%;background:#dbe9ed;color:#345565;font-style:normal;font-weight:800}
.admin-approval-review-steps button.active i{background:#078f80;color:#fff}
.admin-approval-review-steps strong,.admin-approval-review-steps small{display:block}.admin-approval-review-steps small{margin-top:4px;line-height:1.35}
.admin-approval-stage-heading{margin:0 0 18px}.admin-approval-stage-heading h2{margin:6px 0 7px;font-size:clamp(1.35rem,calc(2 * var(--cw-vw)),2rem);color:#0b2944}.admin-approval-stage-heading p{margin:0;color:#627987}
.admin-review-evidence-header-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.admin-review-evidence-header-row>.admin-detail-toolbar{padding:0;margin:0}
.admin-approval-stage .admin-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.admin-approval-stage-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:20px;padding-top:18px;border-top:1px solid #dbe6ea}
.admin-risk-summary{display:grid;grid-template-columns:auto 1fr auto;gap:20px;align-items:center;margin-bottom:18px;padding:22px;border:1px solid #d5e2e7;border-radius:18px;background:#f8fbfc}
.admin-risk-score{display:grid;place-items:center;width:92px;height:92px;border-radius:50%;border:9px solid #65b8ad;background:#fff;color:#0b2944}.admin-risk-score strong{font-size:1.8rem;line-height:1}.admin-risk-score span{font-size:.75rem;color:#6f828e}
.admin-risk-summary h3{margin:4px 0;color:#0b2944}.admin-risk-summary p{margin:0;color:#627987}.admin-risk-level,.admin-risk-chip{display:inline-flex;padding:5px 10px;border-radius:999px;font-size:.75rem;font-weight:800}
.admin-risk-low .admin-risk-level,.admin-risk-chip-clear{background:#dcf5ed;color:#08705e}.admin-risk-medium .admin-risk-level,.admin-risk-chip-notice{background:#fff2c7;color:#8a5c00}.admin-risk-high .admin-risk-level,.admin-risk-chip-high{background:#ffe0cc;color:#a24509}.admin-risk-critical .admin-risk-level,.admin-risk-blocked .admin-risk-level,.admin-risk-chip-critical,.admin-risk-chip-blocked{background:#ffe0e0;color:#a62929}.admin-risk-chip-unavailable{background:#e9eef1;color:#60737d}
.admin-approval-panel{overflow:hidden;border:1px solid #d8e4e8;border-radius:18px;background:#fff}.admin-approval-panel>header{display:flex;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid #e1eaed}.admin-approval-panel h3{margin:0;color:#0b2944}.admin-approval-panel p{margin:5px 0 0;color:#687e8a}.admin-risk-trigger-count{align-self:flex-start;padding:5px 9px;border-radius:999px;background:#edf4f6;color:#365665;font-size:.78rem;font-weight:700}
.admin-risk-table-wrap{overflow:auto}.admin-risk-table{width:100%;border-collapse:collapse;min-width:800px}.admin-risk-table th,.admin-risk-table td{padding:14px 16px;border-bottom:1px solid #edf2f4;text-align:left;vertical-align:middle}.admin-risk-table th{background:#f8fbfc;color:#647a86;font-size:.74rem;text-transform:uppercase;letter-spacing:.05em}.admin-risk-table td:first-child{display:flex;align-items:center;gap:9px}.admin-risk-table td:first-child strong{color:#183b51}.admin-risk-rule-icon{display:grid;place-items:center;flex:0 0 25px;height:25px;border-radius:50%;background:#e4f3ef;color:#087565;font-weight:900}.admin-risk-row.triggered .admin-risk-rule-icon{background:#ffe4de;color:#a83b27}.admin-risk-row.triggered{background:#fffaf8}
.admin-risk-row-duplicate{background:#fff0f0!important;box-shadow:inset 5px 0 0 #c62828}.admin-risk-row-duplicate td{border-top:2px solid #e69a9a;border-bottom:2px solid #e69a9a}.admin-risk-row-duplicate td:first-child{flex-wrap:wrap}.admin-risk-row-duplicate td:first-child strong{color:#8f1d1d;font-size:1.02rem}.admin-risk-row-duplicate .admin-risk-rule-icon{background:#c62828!important;color:#fff!important;box-shadow:0 0 0 4px #ffd9d9}.admin-risk-duplicate-warning{display:block;flex-basis:100%;margin-left:34px;color:#9b2424;font-weight:800;line-height:1.35}
.admin-approval-decision-form,.admin-approval-panel{box-shadow:0 12px 30px rgba(17,50,69,.05)}.admin-approval-decision-form{padding:22px;border:1px solid #d8e4e8;border-radius:18px;background:#fff}.admin-approval-decision-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.admin-approval-note{margin-top:16px}.admin-decision-risk-warning{display:grid;gap:4px;margin-bottom:16px;padding:14px 16px;border-left:4px solid #d89523;border-radius:10px;background:#fff7df;color:#674407}
.admin-fraud-dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.admin-fraud-dialog-header h2{margin:5px 0 16px}.admin-fraud-rule-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.admin-fraud-rule-summary article,.admin-fraud-evidence-list article{display:grid;gap:4px;padding:14px;border:1px solid #dce7eb;border-radius:12px;background:#f8fbfc}.admin-fraud-rule-summary small{color:#70838d}.admin-fraud-rule-section{margin-top:20px}.admin-fraud-rule-section h3{margin:0 0 7px;color:#12374d}.admin-fraud-rule-section p{margin:0;color:#5e7581}.admin-fraud-evidence-list{display:grid;gap:9px}
@media(max-width:900px){:where(html:not(.cw-desktop-scale)) .admin-approval-review-shell{display:block}:where(html:not(.cw-desktop-scale)) .admin-approval-review-steps{display:none}:where(html:not(.cw-desktop-scale)) .admin-approval-mobile-step{display:block}:where(html:not(.cw-desktop-scale)) .admin-approval-stage .admin-detail-grid, :where(html:not(.cw-desktop-scale)) .admin-approval-decision-grid{grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-risk-summary{grid-template-columns:auto 1fr}:where(html:not(.cw-desktop-scale)) .admin-risk-level{grid-column:1/-1;justify-self:start}}
@media(max-width:720px){:where(html:not(.cw-desktop-scale)) .admin-pagination{justify-content:center;flex-wrap:wrap}:where(html:not(.cw-desktop-scale)) .admin-direct-pager{order:3;width:100%;justify-content:center}:where(html:not(.cw-desktop-scale)) .admin-direct-pager .admin-button, :where(html:not(.cw-desktop-scale)) .admin-direct-pager input{min-width:44px;min-height:44px}:where(html:not(.cw-desktop-scale)) .admin-direct-pager .admin-direct-page:not([aria-current="page"]):not(.admin-direct-page-edge){display:none}:where(html:not(.cw-desktop-scale)) .admin-direct-page-go{margin-left:0}}
@media(max-width:600px){:where(html:not(.cw-desktop-scale)) .admin-risk-summary{grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-risk-score{width:76px;height:76px}:where(html:not(.cw-desktop-scale)) .admin-approval-stage-actions{display:grid;grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-approval-stage-actions .admin-button{width:100%}:where(html:not(.cw-desktop-scale)) .admin-fraud-rule-summary{grid-template-columns:1fr}}
.admin-pending-alert{margin:1rem clamp(1rem,calc(3 * var(--cw-vw)),2rem) 0;padding:.8rem 1rem;border:1px solid #e7b840;border-radius:12px;background:#fff8df;color:#493600;display:flex;align-items:center;justify-content:space-between;gap:1rem}
.admin-pending-alert>button{border:0;background:transparent;color:inherit;cursor:pointer;text-align:left}
.admin-pending-alert>button:first-child{display:flex;flex-wrap:wrap;gap:.35rem 1rem;flex:1}
.admin-pending-alert>button:last-child{border:1px solid currentColor;border-radius:999px;padding:.45rem .75rem;white-space:nowrap}
@media(max-width:600px){:where(html:not(.cw-desktop-scale)) .admin-pending-alert{align-items:stretch;flex-direction:column}:where(html:not(.cw-desktop-scale)) .admin-pending-alert>button:last-child{text-align:center}}
@media(prefers-reduced-motion:reduce){.admin-pending-alert{scroll-behavior:auto}}
.admin-release-recipient{margin:14px 0;padding:16px;border:1px solid var(--line,#cfe0de);border-radius:14px;background:#f7fbfa}.admin-release-recipient h3{margin:0 0 8px;font-size:1rem}.admin-release-warning{margin:0 0 14px;padding:10px 12px;border-radius:10px;background:#fff5d9;color:#6f5212;font-size:.86rem;line-height:1.45}.admin-release-recipient-grid{margin:0;display:grid;grid-template-columns:1fr 1fr;gap:12px}.admin-release-recipient-grid div{min-width:0;padding:11px;border-radius:10px;background:#fff}.admin-release-recipient-grid dt{color:#607686;font-size:.76rem;font-weight:750}.admin-release-recipient-grid dd{margin:5px 0 0;color:#0a2943;font-weight:800;overflow-wrap:anywhere}.admin-release-account{grid-column:1/-1}.admin-release-account dd{display:flex;align-items:center;justify-content:space-between;gap:12px}.admin-release-account span{font-variant-numeric:tabular-nums;letter-spacing:.04em}@media(max-width:640px){:where(html:not(.cw-desktop-scale)) .admin-release-recipient-grid{grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-release-account{grid-column:auto}:where(html:not(.cw-desktop-scale)) .admin-release-account dd{align-items:flex-start;flex-direction:column}:where(html:not(.cw-desktop-scale)) .admin-release-account .admin-button{width:100%}}
.admin-comparison-dialog { width: min(760px, calc(calc(100 * var(--cw-vw)) - 32px)); max-height: calc(calc(100 * var(--cw-vh)) - 48px); }
.admin-comparison-list { display: grid; gap: 12px; margin: 20px 0; max-height: calc(60 * var(--cw-vh)); overflow: auto; }
.admin-comparison-card { border: 1px solid var(--admin-border, #d9e2e7); border-radius: 12px; padding: 14px; }
.admin-comparison-card h3 { margin: 0 0 8px; overflow-wrap: anywhere; }
.admin-comparison-card p { margin: 4px 0; overflow-wrap: anywhere; }
.admin-inline-comparison{margin:0 0 24px;border:2px solid #178578;border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 10px 28px rgba(16,75,70,.09)}
.admin-inline-comparison-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px;background:#eaf8f5}
.admin-inline-comparison-heading h3{margin:8px 0 4px;color:#103c4a;font-size:1.16rem;line-height:1.3}.admin-inline-comparison-heading p{margin:0;color:#526c75;line-height:1.45}
.admin-repeat-badge{display:inline-flex;padding:5px 10px;border-radius:999px;background:#fff0d5;color:#754900;font-size:.78rem;font-weight:800}
.admin-inline-comparison-count{flex:0 0 auto;padding:8px 11px;border-radius:999px;background:#087b70;color:#fff;font-size:.82rem;white-space:nowrap}
.admin-inline-comparison-reason{display:grid;grid-template-columns:minmax(150px,auto) minmax(0,1fr);gap:12px;padding:12px 20px;border-top:1px solid #c8e3de;background:#fff8e8;color:#6d4709;overflow-wrap:anywhere}
.admin-inline-comparison-table-wrap{max-width:100%;overflow-x:auto}.admin-inline-comparison-table{width:100%;border-collapse:collapse;table-layout:fixed}.admin-inline-comparison-table th,.admin-inline-comparison-table td{padding:14px 16px;border-top:1px solid #dce7ea;text-align:left;vertical-align:top;overflow-wrap:anywhere}.admin-inline-comparison-table thead th{background:#f5f8fa;color:#405b68;font-size:.78rem;text-transform:uppercase;letter-spacing:.035em}.admin-inline-comparison-table thead th:first-child{width:25%}.admin-inline-comparison-table tbody th{background:#f8fafb;color:#173d4d;font-size:.88rem}.admin-inline-comparison-before{background:#fff9f9;color:#713b3b}.admin-inline-comparison-after{background:#f2fbf8;color:#0f5e55;font-weight:800}.admin-inline-comparison-table td small{display:block;margin-top:5px;color:#687d86;font-size:.72rem;font-weight:700}
.admin-inline-comparison-empty{margin:0;padding:20px;color:#526c75}.admin-inline-comparison-error{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 20px;border-top:1px solid #e6c7c7;background:#fff2f2;color:#812e2e}
.admin-inline-comparison-abandoned{border-color:#d9b15d;background:#fffaf0}.admin-inline-comparison-abandoned .admin-inline-comparison-before{background:#fff1d6;color:#684a0a;border-left:4px solid #d39721}.admin-inline-comparison-abandoned .admin-inline-comparison-after{background:#edf6ff;color:#164c78;border-left:4px solid #3186c6}.admin-inline-comparison-abandoned .admin-repeat-badge{background:#7a5310;color:#fff}
.admin-report-only{display:none}.admin-client-report-view .admin-report-only{display:table-cell}.admin-column-sort{display:inline-flex;align-items:center;gap:5px;padding:0;border:0;background:none;color:inherit;font:inherit;font-weight:inherit;cursor:pointer}.admin-column-sort::after{content:"↕";font-size:.78em;opacity:.55}.admin-column-sort[data-direction="ascending"]::after{content:"↑";opacity:1}.admin-column-sort[data-direction="descending"]::after{content:"↓";opacity:1}.admin-column-sort:focus-visible{outline:3px solid rgba(8,123,112,.3);outline-offset:3px;border-radius:3px}
.admin-select-field:has(#clientSort){display:none}
.admin-full-current-heading{margin:26px 0 14px;padding-top:22px;border-top:1px solid #d9e5e8}.admin-full-current-heading h3{margin:0;color:#12374d}.admin-full-current-heading p{margin:5px 0 0;color:#607984}
.admin-client-link{display:inline;padding:0;border:0;background:none;color:#087b70;font:inherit;font-weight:800;text-align:left;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;cursor:pointer;overflow-wrap:anywhere}
.admin-client-link:hover{color:#055c55}.admin-client-link:focus-visible{outline:3px solid rgba(8,123,112,.28);outline-offset:3px;border-radius:3px}
/* Item 224: a SUSPENDED client's name link is shown in the app danger red
   (#a93030, same ink as the suspend/disapprove dialogs) instead of the normal
   green, as an at-a-glance flag across every admin list. Only the colour (and
   its hover/focus tint) changes — underline, weight and offset inherit from the
   base .admin-client-link so the link is identical in every other respect. */
.admin-client-link--suspended{color:#a93030}
.admin-client-link--suspended:hover{color:#8f2626}.admin-client-link--suspended:focus-visible{outline-color:rgba(169,48,48,.28)}
.admin-repeat-reason{margin:.35rem 0 0;color:#713d08;font-weight:750;line-height:1.4}.admin-repeat-compare{display:block;margin-top:.6rem;min-height:44px;width:max-content;max-width:100%;white-space:normal}
.admin-acquisition-summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px}.admin-acquisition-summary small{color:#5f7480}
.admin-acquisition-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;border-left:5px solid #73838b;border-radius:8px;background:#f4f7f8}.admin-acquisition-line strong{color:#173d4d}.admin-acquisition-facebook{border-color:#1877f2;background:#eef5ff}.admin-acquisition-instagram{border-color:#d62976;background:#fff0f7}.admin-acquisition-google{border-color:#4285f4;background:#f0f6ff}.admin-acquisition-affiliate{border-color:#078f80;background:#edf9f7}.admin-acquisition-direct_untracked{border-color:#d48b18;background:#fff8e8}.admin-acquisition-conflicting{border-color:#c23b3b;background:#fff1f1}.admin-acquisition-conflict-help{flex-basis:100%;color:#7f2525}
.admin-fraud-acquisition-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:11px 0;border-bottom:1px solid #dce7ea}.admin-fraud-acquisition-line .admin-acquisition-conflict-help{padding-left:0}
.admin-affiliate-attribution{padding:4px 8px;border-radius:999px;background:#edf9f7;color:#075f57;font-size:.78rem;font-weight:800}
.admin-evidence-disclosure{margin:0 0 14px;border:1px solid #d8e4e8;border-radius:14px;background:#fff;overflow:hidden}.admin-evidence-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:44px;padding:14px 16px;cursor:pointer;list-style:none}.admin-evidence-disclosure>summary::-webkit-details-marker{display:none}.admin-evidence-disclosure>summary::after{content:"⌄";flex:0 0 auto;font-size:1.2rem;color:#0a776d;transition:transform .15s ease}.admin-evidence-disclosure:not([open])>summary::after{transform:rotate(-90deg)}.admin-evidence-disclosure>summary strong{color:#12374d}.admin-evidence-disclosure>summary small{margin-left:auto;color:#607984}.admin-evidence-disclosure>summary:focus-visible{outline:3px solid rgba(8,123,112,.35);outline-offset:-3px}.admin-evidence-disclosure>.admin-detail-card{margin:0;border-width:1px 0 0;border-radius:0;box-shadow:none}.admin-client-journey{margin:18px 0 0}.admin-client-journey .admin-audit-note,.admin-client-journey .admin-audit-list{margin-left:16px;margin-right:16px}
.admin-wallet-evidence{margin-top:14px;padding-top:12px;border-top:1px solid #dce7ea}.admin-wallet-provider-rows{display:grid;gap:8px}.admin-wallet-provider-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:48px;padding:7px 10px;border:1px solid #dce7ea;border-radius:10px;background:#fbfcfd}.admin-wallet-logo{display:block;width:38px;max-height:28px;object-fit:contain}.admin-wallet-status{justify-self:end;padding:4px 8px;border-radius:999px;background:#edf1f3;color:#49616d;font-size:.76rem;font-weight:800;text-align:right}.admin-wallet-verified .admin-wallet-status{background:#e5f6ee;color:#08704f}.admin-wallet-pending .admin-wallet-status{background:#fff4dc;color:#7a5310}.admin-wallet-error .admin-wallet-status{background:#fff0f0;color:#9c2b2b}.admin-wallet-assessment{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0;padding:18px;border:1px solid #bcded8;border-radius:15px;background:#f7fcfb}.admin-wallet-assessment>header,.admin-wallet-assessment>p,.admin-wallet-matrix{grid-column:1/-1}.admin-wallet-assessment h3,.admin-wallet-person h4{margin:4px 0;color:#12374d}.admin-wallet-person{min-width:0;padding:12px;border:1px solid #dce7ea;border-radius:12px;background:#fff}.admin-wallet-score{margin:0;color:#075f57;font-weight:800}.admin-wallet-manual-review{margin:0;padding:10px 12px;border-left:4px solid #d48b18;border-radius:8px;background:#fff8e8;color:#704b0b;font-weight:800}.admin-wallet-matrix{color:#607984;line-height:1.45}
.admin-list-toolbar{position:relative}.admin-list-sort-field{display:none;min-width:180px}.admin-filter-chips{display:flex;flex:1 0 100%;gap:8px;align-items:center;flex-wrap:wrap;padding-top:8px}.admin-filter-chip{min-height:36px;padding:6px 11px;border:1px solid #acd5cf;border-radius:999px;background:#eef9f7;color:#075f57;font:inherit;font-size:.8rem;font-weight:750;cursor:pointer}.admin-filter-chip:focus-visible{outline:3px solid rgba(8,123,112,.25);outline-offset:2px}.admin-list-reset{min-height:44px}
.admin-fixed-search{display:flex;align-items:center;gap:12px;margin:0 0 14px}.admin-fixed-search input{min-height:44px;min-width:min(360px,100%);padding:10px 12px;border:1px solid #cddde2;border-radius:10px;font:inherit}.admin-safety-order-note{min-width:0;color:#617782;font-size:.82rem;overflow-wrap:anywhere}
.admin-linked-history{max-width:100%}.admin-linked-history table{min-width:720px}
.admin-drawer-title-row>#drawerBackButton{flex:0 0 44px;min-width:44px;min-height:44px}
@media(max-width:760px){
  :where(html:not(.cw-desktop-scale)) .admin-fixed-search{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}:where(html:not(.cw-desktop-scale)) .admin-fixed-search input{width:100%;min-width:0}:where(html:not(.cw-desktop-scale)) .admin-safety-order-note{display:block;width:100%;line-height:1.4}
  :where(html:not(.cw-desktop-scale)) .admin-client-table, :where(html:not(.cw-desktop-scale)) .admin-linked-history table{display:block;min-width:0;width:100%}:where(html:not(.cw-desktop-scale)) .admin-client-table thead, :where(html:not(.cw-desktop-scale)) .admin-linked-history thead{display:none}
  :where(html:not(.cw-desktop-scale)) .admin-client-table tbody, :where(html:not(.cw-desktop-scale)) .admin-linked-history tbody{display:grid;gap:12px}:where(html:not(.cw-desktop-scale)) .admin-client-table tr, :where(html:not(.cw-desktop-scale)) .admin-linked-history tr{display:grid;padding:14px;border:1px solid #d9e5e8;border-radius:14px;background:#fff;box-shadow:0 5px 16px rgba(18,52,70,.05)}
  :where(html:not(.cw-desktop-scale)) .admin-client-table td, :where(html:not(.cw-desktop-scale)) .admin-linked-history td{display:grid!important;grid-template-columns:minmax(112px,40%) minmax(0,1fr);gap:10px;align-items:start;width:auto!important;min-height:44px;padding:9px 0!important;border:0!important;border-bottom:1px solid #edf2f4!important;overflow-wrap:anywhere}
  :where(html:not(.cw-desktop-scale)) .admin-client-table td::before, :where(html:not(.cw-desktop-scale)) .admin-linked-history td::before{content:attr(data-label);color:#607784;font-size:.78rem;font-weight:750}
  :where(html:not(.cw-desktop-scale)) .admin-client-table td:last-child, :where(html:not(.cw-desktop-scale)) .admin-linked-history td:last-child{border-bottom:0!important}:where(html:not(.cw-desktop-scale)) .admin-client-table .admin-table-actions, :where(html:not(.cw-desktop-scale)) .admin-linked-history .admin-view-button{width:100%}
  :where(html:not(.cw-desktop-scale)) .admin-filters select, :where(html:not(.cw-desktop-scale)) .admin-filters input, :where(html:not(.cw-desktop-scale)) .admin-filters button{min-height:44px}:where(html:not(.cw-desktop-scale)) .admin-repeat-compare{width:100%}
  :where(html:not(.cw-desktop-scale)) .admin-list-toolbar{display:grid!important;grid-template-columns:1fr!important}:where(html:not(.cw-desktop-scale)) .admin-list-toolbar>*{width:100%;min-width:0}:where(html:not(.cw-desktop-scale)) .admin-list-sort-field{display:flex}:where(html:not(.cw-desktop-scale)) .admin-filter-chips{display:flex!important}:where(html:not(.cw-desktop-scale)) .admin-filter-chips.admin-hidden{display:none!important}:where(html:not(.cw-desktop-scale)) .admin-filter-chip{width:auto;min-height:44px}
  :where(html:not(.cw-desktop-scale)) .admin-inline-comparison-heading{display:grid;padding:15px}:where(html:not(.cw-desktop-scale)) .admin-inline-comparison-count{justify-self:start}:where(html:not(.cw-desktop-scale)) .admin-inline-comparison-reason{grid-template-columns:1fr;padding:12px 15px}:where(html:not(.cw-desktop-scale)) .admin-inline-comparison-table-wrap{overflow:visible}:where(html:not(.cw-desktop-scale)) .admin-inline-comparison-table, :where(html:not(.cw-desktop-scale)) .admin-inline-comparison-table tbody, :where(html:not(.cw-desktop-scale)) .admin-inline-comparison-table tr{display:block;width:100%}:where(html:not(.cw-desktop-scale)) .admin-inline-comparison-table thead{display:none}:where(html:not(.cw-desktop-scale)) .admin-inline-comparison-table tr{border-top:1px solid #dce7ea}:where(html:not(.cw-desktop-scale)) .admin-inline-comparison-table tbody th{display:block;width:100%;padding:12px 15px;border:0}:where(html:not(.cw-desktop-scale)) .admin-inline-comparison-table td{display:block;width:100%;padding:12px 15px;border:0}:where(html:not(.cw-desktop-scale)) .admin-inline-comparison-table td::before{display:block;margin-bottom:5px;color:#607984;font-size:.72rem;font-weight:800;text-transform:uppercase;content:attr(data-label)}:where(html:not(.cw-desktop-scale)) .admin-inline-comparison-error{align-items:stretch;flex-direction:column}:where(html:not(.cw-desktop-scale)) .admin-inline-comparison-error .admin-button{width:100%}
}
.admin-loan-settings-content, .admin-loan-setting-card, #smsProviderForms { min-width: 0; max-width: 100%; }
.admin-loan-settings-content { overflow-x: clip; }
.admin-loan-setting-card input, .admin-loan-setting-card select, .admin-loan-setting-card textarea { max-width: 100%; box-sizing: border-box; }
#activateLoanDialog { width: min(620px, calc(calc(100 * var(--cw-vw)) - 32px)); height: min(820px, calc(calc(100 * var(--cw-dvh)) - 40px)); max-height: calc(calc(100 * var(--cw-dvh)) - 40px); padding: 0; box-sizing: border-box; overflow: hidden; }
#activateLoanForm { display: grid; width: 100%; height: 100%; max-height: 100%; min-height: 0; padding: 0; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
#activateLoanDialog .admin-release-dialog-body { min-height: 0; padding: 22px 24px 12px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#activateLoanDialog .admin-dialog-actions { position: relative; z-index: 2; flex: 0 0 auto; margin-top: 12px; padding: 12px 0 2px; border-top: 1px solid var(--admin-border, #d9e2e7); background: var(--admin-surface, #fff); }
#disapproveDialog { padding: 0; overflow: hidden; }
#disapproveDialog #disapproveForm { width: 100%; height: 100%; min-height: 0; padding: 0; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
#disapproveDialog .admin-disapproval-dialog-body { min-height: 0; padding: 22px 24px 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#disapproveDialog .admin-dialog-actions { margin: 0; padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--admin-border, #d9e2e7); background: var(--admin-surface, #fff); }
#disapproveDialog .admin-checkbox-list{display:grid;gap:8px;margin-top:8px}#disapproveDialog .admin-checkbox-list>label{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:start;gap:8px;min-height:44px;padding:9px 10px;border:1px solid #d8e4e8;border-radius:10px;background:#fff;cursor:pointer;overflow-wrap:anywhere}#disapproveDialog .admin-checkbox-list input{width:20px;height:20px;margin:3px 0 0;accent-color:#a93030}#disapproveDialog .admin-checkbox-list span{line-height:1.42}#disapproveDialog .admin-checkbox-list>label:has(input:focus-visible){outline:3px solid rgba(169,48,48,.28);outline-offset:2px}
#suspendClientDialog .admin-radio-list{display:grid;gap:8px;margin-top:8px}#suspendClientDialog .admin-radio-list>label{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:start;gap:8px;min-height:44px;padding:9px 10px;border:1px solid #d8e4e8;border-radius:10px;background:#fff;cursor:pointer;overflow-wrap:anywhere}#suspendClientDialog .admin-radio-list input{width:20px;height:20px;margin:3px 0 0;accent-color:#a93030}#suspendClientDialog .admin-radio-list span{line-height:1.42}#suspendClientDialog .admin-radio-list>label:has(input:focus-visible){outline:3px solid rgba(169,48,48,.28);outline-offset:2px}
@media (max-width: 640px) {
  :where(html:not(.cw-desktop-scale)) #activateLoanDialog .admin-dialog-actions{ display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 10px 0 0; }
  :where(html:not(.cw-desktop-scale)) #activateLoanDialog .admin-dialog-actions .admin-button{ min-width: 0; padding-inline: 8px; font-size: .82rem; white-space: normal; }
  :where(html:not(.cw-desktop-scale)) #suspendClientDialog .admin-dialog-actions, :where(html:not(.cw-desktop-scale)) #suspendClientConfirmDialog .admin-dialog-actions, :where(html:not(.cw-desktop-scale)) #unsuspendClientDialog .admin-dialog-actions{ display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
  :where(html:not(.cw-desktop-scale)) #suspendClientDialog form, :where(html:not(.cw-desktop-scale)) #suspendClientConfirmDialog form, :where(html:not(.cw-desktop-scale)) #unsuspendClientDialog form{ max-height: calc(calc(100 * var(--cw-dvh)) - 40px); overflow-y: auto; }
  :where(html:not(.cw-desktop-scale)) #disapproveDialog .admin-disapproval-dialog-body{ padding: 18px 16px 8px; }
  :where(html:not(.cw-desktop-scale)) #disapproveDialog .admin-dialog-actions{ display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  :where(html:not(.cw-desktop-scale)) #disapproveDialog .admin-dialog-actions .admin-button{ width: 100%; min-height: 48px; padding-block: 10px; flex: 0 0 auto; }
  :where(html:not(.cw-desktop-scale)) #disapproveDialog .admin-checkbox-list>label{ grid-template-columns:44px minmax(0,1fr); }
  :where(html:not(.cw-desktop-scale)) .admin-wallet-assessment{grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-wallet-provider-row{grid-template-columns:42px minmax(0,1fr)}:where(html:not(.cw-desktop-scale)) .admin-wallet-status{grid-column:2;justify-self:start}
}

.admin-system-lock{display:inline-flex;margin-left:.4rem;padding:.2rem .45rem;border-radius:999px;background:#e8eef1;color:#425967;font-size:.68rem;font-weight:800;white-space:nowrap}

/* Item 239: multiple disapproval reasons (Option C) -- first reason + "+N more"
   pill that expands the full bulleted list in place. Scoped to .admin-reason-multi
   so no other table column is affected. */
.admin-reason-multi{display:inline;overflow-wrap:anywhere}
.admin-reason-multi .admin-reason-first{display:inline}
.admin-reason-more-pill{display:inline-flex;align-items:center;gap:.25rem;margin-left:.4rem;padding:.08rem .5rem;border:1px solid #c9b6b4;border-radius:999px;background:#f3e6e5;color:#71322e;font-size:.72rem;font-weight:800;line-height:1.3;cursor:pointer;white-space:nowrap;vertical-align:baseline}
.admin-reason-more-pill:hover{background:#ebd6d4}
.admin-reason-more-pill:focus-visible{outline:3px solid rgba(169,48,48,.28);outline-offset:2px}
.admin-reason-list{list-style:disc;margin:.4rem 0 0;padding-left:1.15rem}
.admin-reason-list li{margin:.15rem 0;line-height:1.4}
.admin-reason-list-collapsed{display:none}
.admin-permission-locked{background:#f3f6f7}.admin-permission-locked input{accent-color:#087b70;cursor:not-allowed}
.admin-export-button{min-height:44px}.admin-export-dialog{width:min(620px,calc(calc(100 * var(--cw-vw)) - 32px))}.admin-export-dialog form{display:grid;gap:16px}
.admin-export-dialog h2,.admin-export-dialog p{margin:0}.admin-export-scope{display:grid;gap:8px;margin:0;padding:14px;border:1px solid #d6e2e6;border-radius:12px}.admin-export-scope label{display:flex;align-items:center;gap:10px;min-height:44px}
.admin-export-warning{padding:14px 16px;border-left:5px solid #b66d00;border-radius:10px;background:#fff4dc;color:#5d410e}.admin-export-warning p{margin-top:5px;line-height:1.45}.admin-export-count{min-height:24px;font-weight:800;color:#173d4d}
.admin-voucher-policy-grid{margin-bottom:22px}.admin-voucher-policy-card{display:grid;gap:10px;align-content:start}.admin-voucher-policy-card p{margin:0;color:#5e7581;line-height:1.45}.admin-voucher-policy-card .admin-button{justify-self:start}.admin-voucher-secret{display:block;margin:18px 0;padding:18px;border:2px dashed #087b70;border-radius:12px;background:#eefaf7;color:#083f3a;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:clamp(1.1rem,calc(4 * var(--cw-vw)),1.65rem);font-weight:900;letter-spacing:.08em;text-align:center;overflow-wrap:anywhere}.admin-voucher-report-totals{margin:16px 0}.admin-voucher-table,.admin-voucher-report-table{min-width:780px}
@media(max-width:760px){:where(html:not(.cw-desktop-scale)) .admin-voucher-policy-grid, :where(html:not(.cw-desktop-scale)) .admin-voucher-report-totals{grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-voucher-policy-card .admin-button{width:100%}:where(html:not(.cw-desktop-scale)) .admin-voucher-table, :where(html:not(.cw-desktop-scale)) .admin-voucher-report-table{min-width:720px}:where(html:not(.cw-desktop-scale)) .admin-voucher-secret{letter-spacing:.03em}}
@media(max-width:640px){:where(html:not(.cw-desktop-scale)) .admin-export-button{width:100%}:where(html:not(.cw-desktop-scale)) .admin-export-dialog{width:calc(calc(100 * var(--cw-vw)) - 20px);max-width:none;margin:auto}:where(html:not(.cw-desktop-scale)) .admin-export-dialog .admin-dialog-actions{display:grid;grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-export-dialog .admin-button{width:100%;min-height:44px}}
@media(prefers-reduced-motion:reduce){.admin-export-dialog,.admin-export-dialog::backdrop{animation:none!important;transition:none!important}}
/* Client-created date range stays compact on desktop and becomes a clear calendar block on mobile. */
.admin-client-date-filter{border:1px solid var(--admin-border,#d7dee8);border-radius:10px;padding:6px 8px;display:grid;grid-template-columns:repeat(2,minmax(130px,1fr));gap:6px 8px;min-width:min(100%,320px)}
.admin-client-date-filter legend{padding:0 4px;font-size:12px;font-weight:700}.admin-client-date-filter label{display:grid;gap:3px;font-size:11px}.admin-client-date-filter input{min-height:44px;max-width:100%}
.admin-date-presets{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:5px}.admin-date-presets button{border:1px solid var(--admin-border,#d7dee8);background:var(--admin-surface,#fff);border-radius:999px;min-height:34px;padding:4px 9px;cursor:pointer}
@media(max-width:640px){:where(html:not(.cw-desktop-scale)) .admin-client-date-filter{grid-template-columns:1fr;width:100%}:where(html:not(.cw-desktop-scale)) .admin-date-presets{grid-column:1}:where(html:not(.cw-desktop-scale)) .admin-date-presets button{min-height:44px}}
@media(max-width:640px){
  :where(html:not(.cw-desktop-scale)) #recordRepaymentDialog{max-height:calc(calc(100 * var(--cw-dvh)) - 20px)}
  :where(html:not(.cw-desktop-scale)) #recordRepaymentForm{padding-bottom:calc(16px + env(safe-area-inset-bottom));scroll-padding-bottom:24px}
  :where(html:not(.cw-desktop-scale)) #recordRepaymentDialog .admin-dialog-actions{position:static;margin:18px 0 0;padding:12px 0 0;border-top:1px solid var(--admin-line);display:grid;grid-template-columns:1fr 1fr;gap:8px}
  :where(html:not(.cw-desktop-scale)) #recordRepaymentDialog .admin-dialog-actions .admin-button{min-height:44px;width:100%;padding:8px 10px}
}
.admin-client-report-view .admin-list-header{align-items:flex-start;flex-direction:column}
.admin-client-report-view .admin-filters{display:grid;width:100%;grid-template-columns:minmax(240px,2fr) repeat(2,minmax(180px,1fr));align-items:end}
.admin-client-report-view .admin-search-field{width:100%;min-width:0}
.admin-client-report-view .admin-client-date-filter{grid-column:1/-1;width:min(100%,680px);min-width:0}
.admin-client-report-view .admin-client-filter-actions{grid-column:1/-1;display:flex;align-items:center;gap:9px}
.admin-client-report-view .admin-filter-chips{grid-column:1/-1}
.admin-client-report-view #clientTableRegion{max-width:100%;overflow-x:auto}
.admin-client-report-view .admin-client-table{min-width:2050px;table-layout:auto}
.admin-client-report-view .admin-client-table th{white-space:nowrap;overflow-wrap:normal}
.admin-client-report-view .admin-client-table td{white-space:normal;overflow-wrap:anywhere}
.admin-client-report-view .admin-client-table th:first-child,.admin-client-report-view .admin-client-table td:first-child{min-width:210px}
.admin-client-report-view .admin-client-table th:last-child,.admin-client-report-view .admin-client-table td:last-child{min-width:240px}
.admin-client-report-view .admin-client-table .admin-table-actions{min-width:215px;flex-wrap:nowrap}
.admin-client-report-view .admin-client-table .admin-table-actions>.admin-button{min-width:105px;white-space:normal;overflow-wrap:normal;word-break:normal}
@media(max-width:1180px){:where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-filters{grid-template-columns:minmax(220px,2fr) minmax(180px,1fr)}:where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-client-date-filter{grid-column:1/-1}:where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-filter-button{justify-self:start}}
@media(max-width:760px){:where(html:not(.cw-desktop-scale)) .admin-select-field:has(#clientSort){display:grid}:where(html:not(.cw-desktop-scale)) .admin-select-field:has(#clientSort) select{min-height:44px}:where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-filters{grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-client-date-filter, :where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-client-filter-actions, :where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-filter-chips{grid-column:auto;width:100%}:where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-client-filter-actions{display:grid;grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-filter-button, :where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-list-reset{width:100%}:where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-client-table{min-width:0}:where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-client-table td:first-child, :where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-client-table td:last-child{min-width:0}:where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-client-table .admin-table-actions{min-width:0;flex-wrap:wrap}:where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-client-table .admin-table-actions>.admin-button{min-width:0}}
@media(max-width:760px){
  :where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-client-table td.admin-table-action-cell{display:block!important;width:100%!important;min-width:0;padding-top:10px!important}
  :where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-client-table td.admin-table-action-cell>.admin-table-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;width:100%;min-width:0}
  :where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-client-table td.admin-table-action-cell>.admin-table-actions>.admin-button, :where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-client-table td.admin-table-action-cell .admin-action-menu, :where(html:not(.cw-desktop-scale)) .admin-client-report-view .admin-client-table td.admin-table-action-cell .admin-action-menu>summary{width:100%;min-width:0;min-height:44px}
}
.admin-client-suspended-badge{justify-self:start;margin-top:4px}.admin-dialog-actions-three{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:640px){:where(html:not(.cw-desktop-scale)) .admin-dialog-actions-three{grid-template-columns:1fr}}

/* Items 74-75: approved compact decision-review evidence hierarchy. */
.admin-approval-stage[data-approval-review-view="evidence"] > .admin-detail-grid { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.admin-review-identity-strip{display:flex;align-items:center;gap:16px;min-height:52px;padding:12px 16px;border:1px solid #d8e4e8;border-radius:14px;background:#fff}.admin-review-identity-copy{display:grid;gap:3px}.admin-review-identity-copy strong{color:#0b2944;font-size:1.05rem}.admin-review-identity-copy span,.admin-review-identity-context{color:#607984;overflow-wrap:anywhere}.admin-review-identity-context{display:flex;flex:1;flex-wrap:wrap;gap:5px 16px;font-size:.78rem}
#detailReviewContext .admin-review-identity-strip{min-height:0;margin-top:10px;padding:9px 12px;background:#f8fbfb}#detailReviewContext .admin-review-identity-context>span{min-width:0}
.admin-review-summary-card{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(0,2fr);gap:18px;padding:18px;border:1px solid #d8e4e8;border-radius:14px;background:#fff}.admin-review-summary-primary{display:grid;align-content:center;gap:5px;padding-right:18px;border-right:1px solid #dce7ea}.admin-review-summary-primary small,.admin-review-summary-facts dt{color:#607984;font-size:.75rem;font-weight:750}.admin-review-summary-primary strong{color:#0b2944;font-size:1.35rem;overflow-wrap:anywhere}.admin-review-summary-facts{display:grid;grid-template-columns:minmax(220px,1.45fr) repeat(2,minmax(0,1fr));gap:12px;margin:0}.admin-review-summary-facts div{min-width:0}.admin-review-summary-facts dd{margin:5px 0 0;color:#173d4d;font-weight:800;overflow-wrap:anywhere}.admin-review-pay-loan-days-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.admin-review-pay-loan-days-values span{display:grid;gap:2px}.admin-review-pay-loan-days-values small{color:#607984;font-size:.68rem;font-weight:750}.admin-review-pay-loan-days-values strong{font-size:.82rem}
.admin-review-contact-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.admin-review-contact { min-width: 0; }
/* Item 246 (staging.313): size the NOK 1 / NOK 2 relationship span to match the
   h3 title (14px via inherit) instead of the smaller .admin-wallet-provenance
   .68rem; keeps the muted color + 400 weight so it still reads as secondary. */
.admin-review-contact h3 .admin-review-contact-relationship { font-size: inherit; }
.admin-review-wallet-pairs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.admin-review-wallet-pair{display:grid;place-items:center;align-content:start;gap:5px;min-width:0;padding:9px;border:1px solid #dce7ea;border-radius:10px;background:#fbfcfd;text-align:center}.admin-review-wallet-pair label{display:grid;grid-template-columns:46px minmax(0,1fr);align-items:center;gap:2px;min-height:46px;cursor:pointer}.admin-review-wallet-pair input{appearance:none;width:46px;height:46px;margin:0;justify-self:center;border:0;background:linear-gradient(#fff,#fff) center/16px 16px no-repeat;box-shadow:inset 0 0 0 15px transparent;cursor:pointer}.admin-review-wallet-pair input::before{content:"";display:block;width:14px;height:14px;margin:15px;border:1px solid #52707a;border-radius:3px;background:#fff}.admin-review-wallet-pair input:checked::before{content:"✓";background:#078b80;color:#fff;font-size:12px;font-weight:900;line-height:14px}.admin-review-wallet-pair input:focus-visible{outline:3px solid #147d75;outline-offset:-8px}.admin-review-wallet-pair input:disabled{cursor:not-allowed}.admin-review-wallet-pair .admin-wallet-logo{width:44px;max-height:32px}.admin-review-wallet-pair .admin-wallet-status{justify-self:center;padding:3px 6px;font-size:.7rem}.admin-wallet-auto_verified .admin-wallet-status,.admin-wallet-manually_verified .admin-wallet-status{background:#e5f6ee;color:#08704f}.admin-wallet-name_mismatch .admin-wallet-status,.admin-wallet-stale .admin-wallet-status{background:#fff0e2;color:#8a4d08}.admin-wallet-provider-evidence{color:#78500d;line-height:1.3}
.admin-overdue-range{display:flex;align-items:end;gap:6px;min-width:0;margin:0;padding:4px 6px;border:1px solid #c9d8dd;border-radius:10px}.admin-overdue-range legend{padding:0 4px;font-size:.75rem;font-weight:700}.admin-overdue-range label{display:grid;gap:2px;font-size:.72rem}.admin-overdue-range input{width:64px;min-height:36px}.admin-overdue-range .admin-filter-chip{min-height:36px;margin:0}.admin-overdue-range .admin-filter-chip[aria-pressed="true"]{border-color:#078b80;background:#e5f6f3;color:#075f57}
.admin-review-applications{padding:16px;border:1px solid #d8e4e8;border-radius:14px;background:#fff;overflow-x:auto}.admin-review-applications h3{margin:0 0 12px;color:#0b2944}.admin-review-applications .admin-table{min-width:680px}.admin-review-applications .admin-warning{display:block;margin-top:12px}.admin-review-applications-partial{border-left:5px solid #d48b18}
/* Item 303: All applications fits one desktop screen - fixed layout, 9-column
   width map summing to 100% (12+11+21+13+9+10+10+9+5), wrapped headers. */
@media(min-width:701px){.admin-review-applications{overflow-x:visible}.admin-review-applications .admin-table.admin-review-applications-table{table-layout:fixed;width:100%;min-width:0}.admin-review-applications .admin-review-applications-table th,.admin-review-applications .admin-review-applications-table td{padding:8px 6px;white-space:normal;overflow-wrap:anywhere;word-break:normal;vertical-align:top}.admin-review-applications .admin-review-applications-table th{font-size:11px;line-height:1.25;letter-spacing:.03em}.admin-review-applications .admin-review-applications-table td{font-size:13px;line-height:1.4}.admin-review-applications-table th:nth-child(1),.admin-review-applications-table td:nth-child(1){width:12%}.admin-review-applications-table th:nth-child(2),.admin-review-applications-table td:nth-child(2){width:11%}.admin-review-applications-table th:nth-child(3),.admin-review-applications-table td:nth-child(3){width:21%}.admin-review-applications-table th:nth-child(4),.admin-review-applications-table td:nth-child(4){width:13%}.admin-review-applications-table th:nth-child(5),.admin-review-applications-table td:nth-child(5){width:10%}.admin-review-applications-table th:nth-child(6),.admin-review-applications-table td:nth-child(6){width:10%}.admin-review-applications-table th:nth-child(7),.admin-review-applications-table td:nth-child(7){width:9%}.admin-review-applications-table th:nth-child(8),.admin-review-applications-table td:nth-child(8){width:9%}.admin-review-applications-table th:nth-child(9),.admin-review-applications-table td:nth-child(9){width:5%;overflow:visible;text-align:center}.admin-review-applications .admin-review-applications-table td:nth-child(9) .admin-view-button{min-width:0;padding:0 8px}}:where(html.cw-desktop-scale) .admin-review-applications{overflow-x:visible}:where(html.cw-desktop-scale) .admin-review-applications .admin-table.admin-review-applications-table{table-layout:fixed;width:100%;min-width:0}:where(html.cw-desktop-scale) .admin-review-applications .admin-review-applications-table th, :where(html.cw-desktop-scale) .admin-review-applications .admin-review-applications-table td{padding:8px 6px;white-space:normal;overflow-wrap:anywhere;word-break:normal;vertical-align:top}:where(html.cw-desktop-scale) .admin-review-applications .admin-review-applications-table th{font-size:11px;line-height:1.25;letter-spacing:.03em}:where(html.cw-desktop-scale) .admin-review-applications .admin-review-applications-table td{font-size:13px;line-height:1.4}:where(html.cw-desktop-scale) .admin-review-applications-table th:nth-child(1), :where(html.cw-desktop-scale) .admin-review-applications-table td:nth-child(1){width:12%}:where(html.cw-desktop-scale) .admin-review-applications-table th:nth-child(2), :where(html.cw-desktop-scale) .admin-review-applications-table td:nth-child(2){width:11%}:where(html.cw-desktop-scale) .admin-review-applications-table th:nth-child(3), :where(html.cw-desktop-scale) .admin-review-applications-table td:nth-child(3){width:21%}:where(html.cw-desktop-scale) .admin-review-applications-table th:nth-child(4), :where(html.cw-desktop-scale) .admin-review-applications-table td:nth-child(4){width:13%}:where(html.cw-desktop-scale) .admin-review-applications-table th:nth-child(5), :where(html.cw-desktop-scale) .admin-review-applications-table td:nth-child(5){width:10%}:where(html.cw-desktop-scale) .admin-review-applications-table th:nth-child(6), :where(html.cw-desktop-scale) .admin-review-applications-table td:nth-child(6){width:10%}:where(html.cw-desktop-scale) .admin-review-applications-table th:nth-child(7), :where(html.cw-desktop-scale) .admin-review-applications-table td:nth-child(7){width:9%}:where(html.cw-desktop-scale) .admin-review-applications-table th:nth-child(8), :where(html.cw-desktop-scale) .admin-review-applications-table td:nth-child(8){width:9%}:where(html.cw-desktop-scale) .admin-review-applications-table th:nth-child(9), :where(html.cw-desktop-scale) .admin-review-applications-table td:nth-child(9){width:5%;overflow:visible;text-align:center}:where(html.cw-desktop-scale) .admin-review-applications .admin-review-applications-table td:nth-child(9) .admin-view-button{min-width:0;padding:0 8px}
.admin-review-media{min-height:0}.admin-review-media:empty{display:none}.admin-review-media>.admin-media-grid{grid-template-columns:repeat(5,minmax(0,1fr));}
.admin-approval-stage[data-approval-review-view="evidence"] .admin-media-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
.admin-approval-stage[data-approval-review-view="evidence"] .admin-media-grid img,
.admin-approval-stage[data-approval-review-view="evidence"] .admin-media-grid video { object-fit: contain; max-width: 100%; }
@media(max-width:1000px) {
  :where(html:not(.cw-desktop-scale)) .admin-review-contact-summary{ grid-template-columns: 1fr; }
  :where(html:not(.cw-desktop-scale)) .admin-approval-stage[data-approval-review-view="evidence"] .admin-media-grid{ grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
  :where(html:not(.cw-desktop-scale)) .admin-approval-stage[data-approval-review-view="evidence"] .admin-media-grid{ grid-template-columns: 1fr; }
}
@media(max-width:700px){:where(html:not(.cw-desktop-scale)) .admin-review-identity-strip{align-items:flex-start;flex-wrap:wrap}:where(html:not(.cw-desktop-scale)) .admin-review-identity-copy{flex:1}:where(html:not(.cw-desktop-scale)) .admin-review-identity-context{flex-basis:100%;order:3}:where(html:not(.cw-desktop-scale)) .admin-review-summary-card{grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-review-summary-primary{padding:0 0 12px;border-right:0;border-bottom:1px solid #dce7ea}:where(html:not(.cw-desktop-scale)) .admin-review-summary-facts{grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-review-wallet-pairs{grid-template-columns:1fr 1fr}:where(html:not(.cw-desktop-scale)) .admin-review-applications{padding:12px;overflow-x:auto}:where(html:not(.cw-desktop-scale)) .admin-review-applications table{min-width:920px}:where(html:not(.cw-desktop-scale)) .admin-review-media>.admin-media-grid{grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-overdue-range{flex-wrap:wrap;width:100%}}
@media(max-width:700px){:where(html:not(.cw-desktop-scale)) #detailReviewContext .admin-review-identity-context{display:grid;grid-template-columns:1fr;gap:5px}}

.admin-drawer-body-review .admin-approval-review-footer { position: sticky; bottom: 0; }
.admin-review-wallet-pair{grid-template-columns:minmax(0,1fr) auto;align-items:start;text-align:left}.admin-wallet-control-row{display:grid;grid-template-columns:36px minmax(0,1fr);min-width:0;align-items:start;gap:8px}.admin-wallet-outcomes{display:flex;min-width:0;flex-wrap:wrap;gap:2px 10px;margin:0;padding:4px 8px 5px;border:1px solid #dce7ea;border-radius:8px}.admin-wallet-outcomes-legend{padding:0 4px;color:#49616d;font-size:.68rem;font-weight:800}.admin-wallet-outcomes label{display:inline-flex;min-height:32px;align-items:center;gap:5px;cursor:pointer;font-size:.74rem;font-weight:750;line-height:1.25}.admin-wallet-outcomes input{appearance:auto;accent-color:#078b80;width:14px;height:14px;min-width:14px;margin:0;box-shadow:none;cursor:pointer}.admin-wallet-outcomes input::before{display:none}.admin-wallet-outcomes input:focus-visible{outline:3px solid rgba(8,123,112,.35);outline-offset:3px}.admin-wallet-outcomes input:disabled,.admin-wallet-outcomes input:disabled+span{cursor:not-allowed;opacity:.68}.admin-wallet-recheck-controls{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) auto;min-width:0;align-items:center;gap:6px}.admin-wallet-recheck-reason{width:100%;max-width:none;min-height:36px}.admin-button.admin-wallet-recheck{min-height:36px;padding:6px 9px}.admin-review-wallet-pair>.admin-wallet-status{align-self:start;white-space:nowrap}.admin-wallet-provenance,.admin-wallet-row-error,.admin-wallet-mismatch-detail{grid-column:1/-1}.admin-wallet-provenance{color:#607984;font-size:.68rem}.admin-wallet-row-error{min-height:1em;color:#9c2b2b;font-size:.72rem;font-weight:750}.admin-wallet-saving{color:#4a5568;font-weight:700}.admin-wallet-saving::before{content:"";display:inline-block;width:.7em;height:.7em;margin-right:.4em;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;vertical-align:-1px;animation:admin-wallet-saving-spin .7s linear infinite}@media (prefers-reduced-motion:reduce){.admin-wallet-saving::before{animation:none}}@keyframes admin-wallet-saving-spin{to{transform:rotate(360deg)}}.admin-wallet-mismatch-detail{display:grid;gap:8px;width:100%;min-width:0;overflow-wrap:anywhere;padding:9px;border:1px solid #f0d5b3;border-radius:8px;background:#fffaf3}.admin-wallet-mismatch-title{color:#70400a;font-size:.78rem}.admin-wallet-mismatch-comparison,.admin-wallet-mismatch-meta{display:grid;gap:6px;margin:0}.admin-wallet-mismatch-comparison>div{display:grid;grid-template-columns:minmax(132px,.8fr) minmax(0,1.2fr);gap:8px}.admin-wallet-mismatch-meta{grid-template-columns:repeat(2,minmax(0,1fr));padding-top:7px;border-top:1px solid #f0dfc9}.admin-wallet-mismatch-meta>div{min-width:0}.admin-wallet-mismatch-detail dt{color:#6b7780;font-size:.66rem;font-weight:750}.admin-wallet-mismatch-detail dd{margin:2px 0 0;color:#173d4d;font-size:.74rem;font-weight:800;overflow-wrap:break-word;word-break:normal}
.admin-wallet-recovery-status{display:block;margin-top:2px;font-size:.66rem;font-weight:700;white-space:normal}
.admin-review-wallet-pair>.admin-wallet-status:has(.admin-wallet-recovery-status){grid-column:1/-1;width:100%;justify-self:stretch;text-align:left;white-space:normal;box-sizing:border-box}
.admin-review-wallet-pair>.admin-wallet-status.admin-wallet-status-with-result{grid-column:1/-1;width:100%;justify-self:stretch;text-align:left;white-space:normal;box-sizing:border-box}
.admin-wallet-recovery-status{display:grid;gap:3px;min-width:0;overflow-wrap:anywhere}
.admin-wallet-recovery-summary,.admin-wallet-recovery-explanation{display:block;max-width:100%}
.admin-approval-stage[data-approval-review-view="evidence"] .admin-detail-card-applied > .admin-detail-list { grid-template-columns: repeat(4,minmax(0,1fr)); }
@media(max-width:600px) {
  :where(html:not(.cw-desktop-scale)) .admin-review-wallet-pairs, :where(html:not(.cw-desktop-scale)) .admin-review-wallet-pair{grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-review-wallet-pair>.admin-wallet-status{justify-self:start}:where(html:not(.cw-desktop-scale)) .admin-wallet-control-row{grid-template-columns:32px minmax(0,1fr)}:where(html:not(.cw-desktop-scale)) .admin-wallet-outcomes{display:grid;grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-wallet-outcomes label{min-height:44px}:where(html:not(.cw-desktop-scale)) .admin-wallet-recheck-controls{grid-template-columns:1fr}:where(html:not(.cw-desktop-scale)) .admin-button.admin-wallet-recheck{min-height:44px}:where(html:not(.cw-desktop-scale)) .admin-wallet-mismatch-comparison>div, :where(html:not(.cw-desktop-scale)) .admin-wallet-mismatch-meta{grid-template-columns:1fr}
  :where(html:not(.cw-desktop-scale)) .admin-approval-stage[data-approval-review-view="evidence"] .admin-detail-card-applied > .admin-detail-list{ grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.admin-package-workspace{grid-column:1/-1;min-width:0;overflow:hidden;border:1px solid #d5e4e1;border-radius:14px;background:#f3f7f6}.admin-package-workspace iframe{display:block;width:100%;height:max(720px,calc(calc(100 * var(--cw-vh)) - 250px));border:0;background:#f3f7f6}
@media(max-width:700px){:where(html:not(.cw-desktop-scale)) .admin-package-workspace{margin-inline:-4px}:where(html:not(.cw-desktop-scale)) .admin-package-workspace iframe{height:max(680px,calc(calc(100 * var(--cw-vh)) - 210px))}}
.admin-package-access-card{display:grid;gap:10px}.admin-package-access-heading,.admin-package-access-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.admin-package-access-heading h3{margin:0}.admin-package-access-row{padding:10px 0;border-top:1px solid #dce7e4}.admin-package-access-row select{min-width:150px}.admin-package-access-reason{overflow-wrap:anywhere}.admin-package-override-detail-badge{align-self:flex-start;margin:0 0 8px}
@media(max-width:600px){:where(html:not(.cw-desktop-scale)) .admin-package-access-row{align-items:stretch;flex-direction:column}:where(html:not(.cw-desktop-scale)) .admin-package-access-row select{width:100%;min-height:44px}}

/* Item 133: bank forms are direct card children, so they need their own bounded grid. */
#bankAccountForm,#bankTransactionFilterForm,#bankPostingForm{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));
  align-items:end;
  gap:12px;
  width:100%;
  min-width:0;
}
#bankAccountForm>*,#bankTransactionFilterForm>*,#bankPostingForm>*{min-width:0;max-width:100%}
#bankAccountForm :is(input:not([type="checkbox"]):not([type="radio"]),select,button),#bankTransactionFilterForm :is(input:not([type="checkbox"]):not([type="radio"]),select,button),#bankPostingForm :is(input:not([type="checkbox"]):not([type="radio"]),select,button){width:100%;min-width:0;max-width:100%}
#bankAccountForm .admin-checkbox{display:grid;grid-template-columns:20px minmax(0,1fr);min-height:44px;align-items:center;align-self:end;gap:10px}
#bankAccountForm .admin-checkbox input[type="checkbox"]{width:20px;min-width:20px;height:20px;min-height:20px;margin:0}
@media(max-width:760px){
  :where(html:not(.cw-desktop-scale)) #bankAccountForm, :where(html:not(.cw-desktop-scale)) #bankTransactionFilterForm, :where(html:not(.cw-desktop-scale)) #bankPostingForm{grid-template-columns:minmax(0,1fr)}
}

/* Item 133: finance dialogs and account actions remain usable on narrow screens. */
.admin-dialog.admin-finance-dialog{box-sizing:border-box;width:min(470px,calc(calc(100 * var(--cw-vw)) - 24px));max-width:calc(calc(100 * var(--cw-vw)) - 24px);max-height:calc(calc(100 * var(--cw-dvh)) - 24px);height:auto;margin:auto;overflow:hidden;border-radius:14px}
.admin-dialog.admin-finance-dialog>.admin-dialog-card{box-sizing:border-box;display:grid;width:100%;min-width:0;max-height:calc(calc(100 * var(--cw-dvh)) - 24px);padding:24px;overflow-y:auto;overscroll-behavior:contain}
.admin-finance-dialog .admin-filter-field,.admin-finance-dialog :is(input,select){box-sizing:border-box;width:100%;min-width:0;max-width:100%}
.admin-finance-dialog :is(input,select){min-height:44px}
.admin-finance-dialog .admin-dialog-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.admin-finance-dialog .admin-dialog-actions .admin-button{width:100%;min-width:0;min-height:44px;white-space:normal}
/* Item 386: View + More on one line; no 2-col stacked grid */
#bankAccountRows .admin-table-action-cell>.admin-table-actions{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:8px;width:auto;min-width:0}
#bankAccountRows .admin-table-action-cell>.admin-table-actions>.admin-button,
#bankAccountRows .admin-table-action-cell>.admin-table-actions>.admin-action-menu>.admin-action-menu-trigger{width:auto;min-width:0;min-height:36px;white-space:nowrap;overflow-wrap:normal}
@media(max-width:700px){
  :where(html:not(.cw-desktop-scale)) .admin-dialog.admin-finance-dialog{width:calc(calc(100 * var(--cw-vw)) - 20px);max-width:calc(calc(100 * var(--cw-vw)) - 20px);height:auto;max-height:calc(calc(100 * var(--cw-dvh)) - 20px);margin:auto;border-radius:14px}
  :where(html:not(.cw-desktop-scale)) .admin-dialog.admin-finance-dialog>.admin-dialog-card{min-height:0;max-height:calc(calc(100 * var(--cw-dvh)) - 20px);padding:18px 16px}
  :where(html:not(.cw-desktop-scale)) #bankAccountRows .admin-table-action-cell{display:block!important;width:100%!important;padding-top:10px!important}
  :where(html:not(.cw-desktop-scale)) #bankAccountRows .admin-table-action-cell>.admin-table-actions{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:8px;width:100%}
}

/* Item 107: shared desktop density, overflow and action-reachability contract. */
@media (min-width:761px) {
  .admin-list-header{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(0,2.2fr);align-items:end}
  .admin-list-header>div{align-self:center;min-width:0}
  .admin-list-header>.admin-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));align-items:end;gap:12px;width:100%}
  .admin-list-header .admin-search-field{width:100%;min-width:220px}
  .admin-list-header .admin-filter-field{display:grid;min-width:0;gap:6px}
  .admin-list-header .admin-filter-field>span:not(.admin-visually-hidden){min-height:1.35em;color:var(--admin-muted);font-size:10px;font-weight:800;line-height:1.35}
  .admin-list-header .admin-filter-field :is(input,select),.admin-list-header .admin-filter-button{width:100%;min-width:0;min-height:44px}
  #collectorReportFilterForm{grid-template-columns:minmax(150px,.8fr) minmax(150px,.8fr) minmax(220px,1.4fr) auto}
  #collectorReportFilterForm .admin-button{min-width:96px}
  .admin-client-report-view .admin-list-header{grid-template-columns:minmax(260px,.7fr) minmax(0,2.3fr)}
  .admin-client-report-view .admin-filters{grid-template-columns:repeat(3,minmax(180px,1fr));gap:12px}
  .admin-client-report-view .admin-client-date-filter,.admin-client-report-view .admin-client-filter-actions,.admin-client-report-view .admin-filter-chips{grid-column:1/-1}
  .admin-client-report-view .admin-client-date-filter{width:100%}
}:where(html.cw-desktop-scale) .admin-list-header{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(0,2.2fr);align-items:end}:where(html.cw-desktop-scale) .admin-list-header>div{align-self:center;min-width:0}:where(html.cw-desktop-scale) .admin-list-header>.admin-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));align-items:end;gap:12px;width:100%}:where(html.cw-desktop-scale) .admin-list-header .admin-search-field{width:100%;min-width:220px}:where(html.cw-desktop-scale) .admin-list-header .admin-filter-field{display:grid;min-width:0;gap:6px}:where(html.cw-desktop-scale) .admin-list-header .admin-filter-field>span:not(.admin-visually-hidden){min-height:1.35em;color:var(--admin-muted);font-size:10px;font-weight:800;line-height:1.35}:where(html.cw-desktop-scale) .admin-list-header .admin-filter-field :is(input,select), :where(html.cw-desktop-scale) .admin-list-header .admin-filter-button{width:100%;min-width:0;min-height:44px}:where(html.cw-desktop-scale) #collectorReportFilterForm{grid-template-columns:minmax(150px,.8fr) minmax(150px,.8fr) minmax(220px,1.4fr) auto}:where(html.cw-desktop-scale) #collectorReportFilterForm .admin-button{min-width:96px}:where(html.cw-desktop-scale) .admin-client-report-view .admin-list-header{grid-template-columns:minmax(260px,.7fr) minmax(0,2.3fr)}:where(html.cw-desktop-scale) .admin-client-report-view .admin-filters{grid-template-columns:repeat(3,minmax(180px,1fr));gap:12px}:where(html.cw-desktop-scale) .admin-client-report-view .admin-client-date-filter, :where(html.cw-desktop-scale) .admin-client-report-view .admin-client-filter-actions, :where(html.cw-desktop-scale) .admin-client-report-view .admin-filter-chips{grid-column:1/-1}:where(html.cw-desktop-scale) .admin-client-report-view .admin-client-date-filter{width:100%}
@media (min-width:761px) and (max-width:1500px) {
  .admin-list-header,.admin-client-report-view .admin-list-header{grid-template-columns:1fr;align-items:stretch}
  .admin-list-header>.admin-filters{grid-template-columns:repeat(3,minmax(170px,1fr))}
  #collectorReportFilterForm{grid-template-columns:repeat(3,minmax(180px,1fr))}
  #collectorReportFilterForm .admin-button{justify-self:start;min-width:120px}
}:where(html.cw-desktop-scale) .admin-list-header, :where(html.cw-desktop-scale) .admin-client-report-view .admin-list-header{grid-template-columns:1fr;align-items:stretch}:where(html.cw-desktop-scale) .admin-list-header>.admin-filters{grid-template-columns:repeat(3,minmax(170px,1fr))}:where(html.cw-desktop-scale) #collectorReportFilterForm{grid-template-columns:repeat(3,minmax(180px,1fr))}:where(html.cw-desktop-scale) #collectorReportFilterForm .admin-button{justify-self:start;min-width:120px}

/* Staging .172 UI/UX remediation: keep Client Directory filters on explicit,
   predictable tracks instead of inheriting the generic list-filter flow. */
#clientFilterForm {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(2, minmax(150px, 1fr)) minmax(180px, auto);
  grid-template-areas:
    "search status classification actions"
    "dates dates dates dates"
    "chips chips chips chips";
  align-items: end;
  gap: 12px;
  width: 100%;
}
#clientFilterForm > * { min-width: 0; }
#clientFilterForm .admin-search-field,
#clientFilterForm .admin-select-field,
#clientFilterForm .admin-select-field select { width: 100%; }
#clientFilterForm .admin-search-field { grid-area: search; }
#clientFilterForm .admin-select-field:has(#clientJourneyStatus) { grid-area: status; }
#clientFilterForm .admin-select-field:has(#clientClassification) { grid-area: classification; }
#clientFilterForm .admin-select-field:has(#clientSort) { grid-area: sort; }
#clientFilterForm .admin-client-date-filter {
  grid-area: dates;
  grid-column: 1 / -1;
  box-sizing: border-box;
  margin: 0;
  width: 100%;
  min-width: 0;
}
#clientFilterForm .admin-client-filter-actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: repeat(2, minmax(88px, 1fr));
  gap: 8px;
}
#clientFilterForm .admin-client-filter-actions .admin-button { width: 100%; }
#clientFilterForm .admin-filter-chips { grid-area: chips; grid-column: 1 / -1; }

/* Financial values are atomic: never split a count, currency amount or
   percentage across lines. Mobile uses one summary card per row. */
.package-report-summary .admin-summary-card strong {
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1180px) and (min-width: 761px) {
  :where(html:not(.cw-desktop-scale)) #clientFilterForm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "search search"
      "status classification"
      "dates dates"
      "actions actions"
      "chips chips";
  }
  :where(html:not(.cw-desktop-scale)) #clientFilterForm .admin-search-field,
  :where(html:not(.cw-desktop-scale)) #clientFilterForm .admin-client-date-filter,
  :where(html:not(.cw-desktop-scale)) #clientFilterForm .admin-client-filter-actions,
  :where(html:not(.cw-desktop-scale)) #clientFilterForm .admin-filter-chips { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :where(html:not(.cw-desktop-scale)) #clientFilterForm{
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "search"
      "status"
      "dates"
      "classification"
      "sort"
      "actions"
      "chips";
  }
  :where(html:not(.cw-desktop-scale)) #clientFilterForm > *, :where(html:not(.cw-desktop-scale)) #clientFilterForm .admin-search-field, :where(html:not(.cw-desktop-scale)) #clientFilterForm .admin-client-date-filter, :where(html:not(.cw-desktop-scale)) #clientFilterForm .admin-client-filter-actions, :where(html:not(.cw-desktop-scale)) #clientFilterForm .admin-filter-chips{ grid-column: 1; width: 100%; }
  :where(html:not(.cw-desktop-scale)) #clientFilterForm .admin-client-date-filter{ grid-template-columns: minmax(0, 1fr); }
  :where(html:not(.cw-desktop-scale)) #clientFilterForm .admin-date-presets{ grid-column: 1; }
  :where(html:not(.cw-desktop-scale)) #clientFilterForm .admin-client-filter-actions{ grid-template-columns: minmax(0, 1fr); }
  /* This protected report must remain one column even though the later-loaded
     production redesign applies a generic two-column mobile summary grid. */
  :where(html:not(.cw-desktop-scale)) #packageReportSection .package-report-summary{
    grid-template-columns: minmax(0, 1fr) !important;
  }
  :where(html:not(.cw-desktop-scale)) .package-report-summary .admin-summary-card{ min-width: 0; }
  :where(html:not(.cw-desktop-scale)) .package-report-summary .admin-summary-card strong{
    font-size: clamp(18px, calc(5.5 * var(--cw-vw)), 22px);
    letter-spacing: -.025em;
  }
  :where(html:not(.cw-desktop-scale)) #packageReportSection, :where(html:not(.cw-desktop-scale)) #packageReportSection > *, :where(html:not(.cw-desktop-scale)) .package-report-summary, :where(html:not(.cw-desktop-scale)) .package-report-table-region{
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  :where(html:not(.cw-desktop-scale)) .package-report-summary > .admin-summary-card{
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }
  :where(html:not(.cw-desktop-scale)) .package-report-table-region{
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
  }
  :where(html:not(.cw-desktop-scale)) .package-report-table, :where(html:not(.cw-desktop-scale)) .package-report-table tbody, :where(html:not(.cw-desktop-scale)) .package-report-table tfoot, :where(html:not(.cw-desktop-scale)) .package-report-table tr{
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  :where(html:not(.cw-desktop-scale)) .package-report-table tr{
    display: block;
  }
  :where(html:not(.cw-desktop-scale)) .package-report-table td, :where(html:not(.cw-desktop-scale)) .package-report-table th{
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }
  :where(html:not(.cw-desktop-scale)) .package-report-table td:has(.package-financial-detail){
    display: block;
    text-align: left;
  }
  :where(html:not(.cw-desktop-scale)) .package-report-table td:has(.package-financial-detail)::before{
    display: block;
    margin-bottom: 6px;
  }
  :where(html:not(.cw-desktop-scale)) .package-report-table details, :where(html:not(.cw-desktop-scale)) .package-financial-detail{
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  :where(html:not(.cw-desktop-scale)) .package-financial-detail div{
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
  }
  :where(html:not(.cw-desktop-scale)) .package-financial-detail dt{
    min-width: 0;
    overflow-wrap: anywhere;
  }
  :where(html:not(.cw-desktop-scale)) .package-financial-detail dd{
    margin-inline-start: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
}

.admin-table-region,.admin-table-wrap{scrollbar-gutter:stable both-edges;overscroll-behavior-inline:contain;padding-bottom:8px;background:linear-gradient(to right,transparent calc(100% - 26px),rgba(6,30,53,.07)) right/26px 100% no-repeat,var(--admin-paper)}
.admin-table-region::-webkit-scrollbar,.admin-table-wrap::-webkit-scrollbar{height:12px}
.admin-table-region::-webkit-scrollbar-thumb,.admin-table-wrap::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:999px;background:#8194a3;background-clip:padding-box}
.admin-table-region .admin-table th:first-child,.admin-table-region .admin-table td:first-child{position:sticky;z-index:1;left:0;background:inherit}
.admin-table-region .admin-table th:last-child,.admin-table-region .admin-table td:last-child{position:sticky;z-index:1;right:0;min-width:148px;background:#fff;box-shadow:-8px 0 14px rgba(6,30,53,.08)}
.admin-table-region .admin-table th:last-child{z-index:2;background:#f8fafb}
/* .116 (bug B): the pending table's columns already sum to exactly 100%, so it
   must NOT inherit the generic sticky-right action column with min-width:148px —
   that fixed floor made the 8 columns overflow #tableRegion and clipped the right
   edge (Employer / "View detail"). Neutralise the sticky + min-width for this
   table only; its own admin-col-action percentage governs the width instead. */
.admin-table-region .admin-application-table th:last-child,
.admin-table-region .admin-application-table td:last-child{position:static;z-index:auto;right:auto;min-width:0;background:inherit;box-shadow:none}
.admin-table-region .admin-application-table th:first-child,
.admin-table-region .admin-application-table td:first-child{position:static;left:auto;background:inherit}
.admin-application-table td .admin-table-actions{min-width:0}
/* .116 (bug B): shorten the action button padding so "View detail" fits the
   percentage Action column at ~1060px without clipping. */
.admin-application-table .admin-col-action .admin-view-button{padding:0 8px;min-width:0;white-space:nowrap}
.admin-table td,.admin-table th{overflow-wrap:normal;word-break:normal}
.admin-table td{line-height:1.4}
.admin-table td .admin-table-actions,.admin-user-table td:last-child{min-width:148px}
.admin-table-actions{align-items:center;min-width:0}
.admin-table-actions :is(button,a),.admin-user-table td:last-child :is(button,a){min-height:44px;padding-inline:12px;white-space:normal;line-height:1.25}
.admin-user-table{min-width:980px}
.admin-user-table th:last-child,.admin-user-table td:last-child{width:190px;min-width:190px}

.admin-review-wallet-pairs{align-items:start;grid-template-columns:repeat(2,minmax(0,1fr))}
.admin-review-wallet-pair{grid-template-columns:minmax(0,1fr);align-content:start;min-width:0;gap:10px;padding:12px;text-align:left}
.admin-review-wallet-pair.admin-wallet-review_required{grid-column:1/-1}
.admin-review-wallet-pair.admin-wallet-review_required>.admin-wallet-status{grid-column:1/-1;justify-self:stretch;width:100%;min-width:0;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;text-align:left}
.admin-wallet-control-row{grid-template-columns:44px minmax(0,1fr);align-items:start;gap:10px}
.admin-wallet-outcomes{display:grid;grid-template-columns:1fr;width:100%;gap:2px;padding:7px 9px}
.admin-wallet-outcomes-legend{margin-bottom:2px;line-height:1.35}
.admin-wallet-outcomes label{min-height:44px;padding:7px 5px;line-height:1.35}
.admin-wallet-outcomes input{width:18px;height:18px;min-width:18px}
.admin-wallet-recheck-controls{align-self:end;gap:10px}
.admin-button.admin-wallet-recheck{min-height:44px}
.admin-wallet-recheck-controls:has(.admin-wallet-recheck-loader){grid-template-columns:minmax(0,1fr) 20px}
.admin-wallet-recheck-controls:has(.admin-wallet-recheck-loader) .admin-wallet-recheck-reason{grid-column:1/-1}
.admin-wallet-recheck-loader{display:inline-flex;align-items:center;justify-content:center;min-width:20px}
.admin-wallet-recheck-loader .admin-spinner{width:20px;height:20px;border-width:2px}
.admin-review-wallet-pair:has(.admin-wallet-mismatch-detail){grid-column:1/-1}
.admin-wallet-mismatch-detail{grid-template-columns:minmax(0,1fr);min-width:0;overflow-wrap:anywhere}
.admin-wallet-mismatch-comparison>div{grid-template-columns:minmax(150px,.7fr) minmax(0,1.3fr)}
.admin-wallet-mismatch-detail dd{overflow-wrap:anywhere;word-break:normal}
.admin-wallet-reference-row dd{display:flex;align-items:center;gap:8px;min-width:0}
.admin-wallet-reference-value{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.admin-wallet-reference-copy{flex:0 0 auto;min-width:44px;min-height:44px;padding:0 10px}

#recordRepaymentDialog{max-height:calc(calc(100 * var(--cw-dvh)) - 32px)}
#recordRepaymentForm{display:flex;box-sizing:border-box;max-height:calc(calc(100 * var(--cw-dvh)) - 32px);padding:24px 28px 0;flex-direction:column;overflow-y:auto}
#recordRepaymentDialog .admin-dialog-actions{position:sticky;bottom:0;margin:18px -28px 0;padding:14px 28px calc(14px + env(safe-area-inset-bottom));flex:0 0 auto;background:#fff}
/* Keep repayment controls aligned even when only one field has helper text. */
#recordRepaymentForm .admin-dialog-field-grid > .admin-field {
  min-width: 0;
  margin: 0;
  align-content: start;
}
#recordRepaymentForm .admin-dialog-field-grid > .admin-field > :is(span, label) {
  min-height: 22px;
  color: #33485f;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}
#recordRepaymentForm .admin-dialog-field-grid > .admin-field > label small {
  margin-left: 4px;
  color: var(--admin-muted);
  font-weight: 650;
}
#recordRepaymentForm .admin-dialog-field-grid :is(input, select) {
  box-sizing: border-box;
  height: 46px;
  min-width: 0;
}
#recordRepaymentForm .admin-repayment-loan-control .admin-button { min-height: 46px; }


.admin-icon-button,.admin-notification-bell{min-width:44px;min-height:44px;width:44px;height:44px}
.admin-notification-menu{padding:4px}
.admin-notification-count{top:0;right:0;min-width:1.35rem;height:1.35rem;transform:translate(22%,-22%)}
#adminApp :is(button,a,input,select,textarea):focus-visible{scroll-margin:12px}
@media(max-width:980px){:where(html:not(.cw-desktop-scale)) .admin-review-wallet-pairs{grid-template-columns:1fr}}
@media(max-width:980px){
  :where(html:not(.cw-desktop-scale)) .admin-review-wallet-pair>.admin-wallet-status{grid-column:1/-1;justify-self:stretch;width:100%;min-width:0;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;text-align:left}
  :where(html:not(.cw-desktop-scale)) .admin-wallet-outcomes{min-width:0;max-width:100%;box-sizing:border-box}
  :where(html:not(.cw-desktop-scale)) .admin-wallet-outcomes label span{min-width:0;overflow-wrap:anywhere}
  :where(html:not(.cw-desktop-scale)) .admin-wallet-provenance{min-width:0;overflow-wrap:anywhere}
}

/* Item 167: Updates-tab per-item screenshots — toggle button + inline figures. */
.admin-update-item__media-toggle {
  margin-top: .75rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .75rem;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: var(--admin-accent, #2563eb);
  background: var(--admin-surface-muted, #f3f6fb);
  border: 1px solid var(--admin-border, #d8dee8);
  border-radius: .6rem;
  cursor: pointer;
}
.admin-update-item__media-toggle:hover { background: var(--admin-surface-hover, #e8eef7); }
.admin-update-item__media-toggle:focus-visible { outline: 2px solid var(--admin-accent, #2563eb); outline-offset: 2px; }
.admin-update-item__media { margin-top: .75rem; display: grid; gap: .75rem; }
.admin-update-item__media.admin-hidden { display: none; }
.admin-update-item__figure { margin: 0; display: grid; gap: .35rem; }
.admin-update-item__figure img {
  display: block;
  max-width: 100%;
  max-height: calc(70 * var(--cw-vh));
  height: auto;
  border: 1px solid var(--admin-border, #d8dee8);
  border-radius: .6rem;
  background: var(--admin-surface-muted, #f3f6fb);
}
.admin-update-item__caption { font-size: .8rem; color: var(--admin-muted, #596579); }

/* CW-PROD-DESK-UIUX-011: specificity-safe target sizing over later theme CSS. */
#adminApp .admin-nav-link,
#adminApp .admin-sidebar-action,
#adminApp .admin-button,
#adminApp #filterForm .admin-filter-actions .admin-button,
#adminApp .admin-search-field input,
#adminApp .admin-filter-field :is(input,select),
#adminApp .admin-select-field select,
#adminApp .admin-list-sort-field select,
#adminApp .admin-column-sort,
#adminApp .admin-sort-button,
#adminApp #pendingSoundToggle,
#adminApp #recordRepaymentForm :is(input,select,textarea) {
  min-height: 44px;
}

/* Item 130: the repayment acknowledgement remains a native compact checkbox. */
#adminApp #recordRepaymentForm .admin-repayment-gateway-warning > input[type="checkbox"] {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  flex-basis: 20px;
}

.released-date-filter { flex: 1 1 100%; min-width: 0; margin: 0; padding: .75rem; border: 1px solid var(--admin-border, #d8dee8); border-radius: .75rem; }
.released-date-filter__legend { padding: 0 .25rem; font-weight: 700; }
.released-date-filter__presets { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .5rem; align-items: stretch; }
.released-date-filter__custom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; align-items: end; margin-top: .5rem; }
.released-date-filter__preset { width: 100%; min-width: 0; min-height: 2.75rem; padding-inline: .65rem; line-height: 1.2; white-space: normal; }
.released-date-filter__preset[aria-pressed="true"] { border-color: #0b6bcb; box-shadow: 0 0 0 2px rgba(11,107,203,.2); }
.released-date-filter__custom .admin-field { min-width: 0; }
:where(#loanFilterForm, #collectionQueueFilterForm, #futureCollectionFilterForm, #receivablesFilterForm, #badDebtFilterForm) > .released-date-filter { grid-column: 1 / -1; width: 100%; max-width: 100%; }
.admin-employer-correction-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.admin-employer-correction-form > .admin-filter-field { display: grid; min-width: 0; gap: .35rem; }
.admin-employer-correction-form :is(input, select, textarea) { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; }
.admin-employer-correction-form textarea { min-height: 5rem; resize: vertical; }
.admin-updates-list { display: grid; gap: 1rem; }
.admin-update-release { padding: 1rem; border: 1px solid var(--admin-border, #d8dee8); border-radius: .9rem; background: #fff; }
.admin-update-release__header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: baseline; }
.admin-update-release__header h3, .admin-update-release__time, .admin-update-item h4, .admin-update-item h5 { margin: 0; }
.admin-update-release__time { color: var(--admin-muted, #596579); }
.admin-update-item { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--admin-border, #d8dee8); }
.admin-update-item__group { margin-top: .75rem; }
.admin-update-item__group ul { margin: .35rem 0 0; padding-inline-start: 1.25rem; }
.admin-update-item__group li + li { margin-top: .35rem; }
@media (max-width: 1180px) {
  :where(html:not(.cw-desktop-scale)) .released-date-filter__presets{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :where(html:not(.cw-desktop-scale)) .released-date-filter__presets{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :where(html:not(.cw-desktop-scale)) .released-date-filter__custom{ grid-template-columns: minmax(0, 1fr); }
}

/* Shared release modal: center at every viewport and size actions to visible controls. */
#activateLoanDialog { margin: auto; }
#activateLoanDialog .admin-dialog-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 12px 16px; margin: 0; }
#activateLoanDialog .admin-dialog-actions .admin-button { min-height: 44px; }
@media (max-width:640px) {
  :where(html:not(.cw-desktop-scale)) #activateLoanDialog .admin-dialog-actions .admin-button{ flex: 1 1 110px; }
}

.admin-finance-dialog textarea { box-sizing: border-box; width: 100%; min-height: 90px; padding: 10px; font: inherit; border: 1px solid var(--admin-border,#c6d7d9); border-radius: 8px; }
.admin-release-confirmation { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; }
.admin-finance-dialog .admin-release-confirmation input { width: 20px; min-width: 20px; min-height: 20px; height: 20px; }

/* Native finance dialogs size to their fields instead of filling mobile height. */
.admin-dialog.admin-finance-dialog { height: fit-content; }
/* Override the legacy full-screen accessibility rule for compact finance forms. */
.admin-dialog.admin-finance-dialog { height: fit-content !important; }
.admin-finance-dialog .admin-filter-field { display: grid; gap: 6px; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.admin-finance-dialog .admin-filter-field :is(input,select,textarea) { box-sizing: border-box; width: 100%; min-width: 0; padding: 10px 12px; font: inherit; font-weight: 400; border: 1px solid var(--admin-line,#c6d7d9); border-radius: 8px; background: white; }
#payoutGatewaySetup .admin-dialog-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 12px 0; }
#payoutGatewaySetup .admin-dialog-actions .admin-button { flex: 1 1 160px; min-height: 44px; }
#bankAccountForm .admin-filter-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
#bankAccountForm .admin-filter-field :is(input,select) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; font: inherit; font-weight: 400; border: 1px solid var(--admin-line,#c6d7d9); border-radius: 8px; background: white; }

/* Bank account and transaction forms share responsive dialog presentation. */
:is(#bankAccountDialog, .admin-bank-transaction-dialog) { width: min(720px, calc(calc(100 * var(--cw-vw)) - 28px)); }
:is(#bankAccountDialog, .admin-bank-transaction-dialog)[open] { display: block; }
:is(#bankAccountDialog, .admin-bank-transaction-dialog) form.admin-dialog-structure { grid-template-columns: minmax(0, 1fr); gap: 0; align-items: stretch; }
:is(#bankAccountDialog, .admin-bank-transaction-dialog) .admin-dialog-field-grid { margin-bottom: 0; }
:is(#bankAccountDialog, .admin-bank-transaction-dialog) .admin-dialog-footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
:is(#bankAccountDialog, .admin-bank-transaction-dialog) .admin-dialog-footer .admin-button { min-height: 44px; }
:is(#bankAccountDialog, .admin-bank-transaction-dialog) .admin-field { min-width: 0; margin-top: 0; }
:is(#bankAccountDialog, .admin-bank-transaction-dialog) .admin-field input,
:is(#bankAccountDialog, .admin-bank-transaction-dialog) .admin-field select { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; min-height: 44px; }
@media (max-width: 700px) {
  :where(html:not(.cw-desktop-scale)) :is(#bankAccountDialog, .admin-bank-transaction-dialog){ width: calc(100 * var(--cw-vw)); }
  :where(html:not(.cw-desktop-scale)) :is(#bankAccountDialog, .admin-bank-transaction-dialog) .admin-dialog-field-grid{ grid-template-columns: minmax(0, 1fr); }
}

/* Finance tables share header and empty-state presentation. */
:is(#bankAccountsSection, #bankTransactionsSection) .admin-column-sort { text-transform: inherit; letter-spacing: inherit; text-align: left; }
:is(#bankAccountsSection, #bankTransactionsSection) th[aria-sort="ascending"] .admin-column-sort::after { content: "↑"; opacity: 1; }
:is(#bankAccountsSection, #bankTransactionsSection) th[aria-sort="descending"] .admin-column-sort::after { content: "↓"; opacity: 1; }
:is(#bankAccountsSection, #bankTransactionsSection) .admin-table-region .admin-table th,
:is(#bankAccountsSection, #bankTransactionsSection) .admin-table-region .admin-table td { position: static; box-shadow: none; }
:is(#bankAccountsSection, #bankTransactionsSection) .admin-table-region .admin-table th { white-space: normal; }
:is(#bankAccountsSection, #bankTransactionsSection) .admin-table-region .admin-table th:last-child,
:is(#bankAccountsSection, #bankTransactionsSection) .admin-table-region .admin-table td:last-child { min-width: 0; }
/* Item 386: keep flex Actions; fixed Actions column width */
:is(#bankAccountsSection, #bankTransactionsSection) #bankAccountRows .admin-table-actions { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; }
#bankAccountsSection .admin-table-region .admin-table th:last-child,
#bankAccountsSection .admin-table-region .admin-table td:last-child,
#bankAccountsSection .admin-table-region .admin-table th.admin-table-action-cell,
#bankAccountsSection .admin-table-region .admin-table td.admin-table-action-cell {
  width: 248px; min-width: 248px; max-width: 248px;
}
#bankAccountsSection .admin-table-action-cell.admin-action-menu-open { z-index: 1301; overflow: visible; }
.admin-action-menu-separator {
  height: 1px; margin: 6px 4px; background: var(--admin-line, #d7e0e6); border: 0;
}
:is(#bankAccountsSection, #bankTransactionsSection) .admin-table-region:has(:is(#bankAccountsEmpty, #bankTransactionsEmpty):not(.admin-hidden)) { min-height: 220px; padding: 0; overflow: hidden; background: var(--admin-paper); }
:is(#bankAccountsSection, #bankTransactionsSection) .admin-table-region:has(:is(#bankAccountsEmpty, #bankTransactionsEmpty):not(.admin-hidden)) .admin-table { display: none; }
:is(#bankAccountsEmpty, #bankTransactionsEmpty) { min-height: 220px; }

/* Match the finance filter panel to the admin form controls. */
#bankTransactionsSection > .admin-section-heading > div { min-width: 0; }
#bankTransactionsSection #addBankTransactionButton { flex-shrink: 0; }
#bankTransactionFilterForm { box-sizing: border-box; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 20px; margin: 0; border-bottom: 1px solid var(--admin-line); }
#bankTransactionFilterForm .admin-filter-field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
#bankTransactionFilterForm .admin-filter-field :is(input,select) { box-sizing: border-box; width: 100%; min-width: 0; height: 44px; padding: 10px 12px; border: 1px solid var(--admin-line); border-radius: 8px; background: white; color: var(--admin-ink); font: inherit; font-weight: 400; }
#bankTransactionFilterForm .admin-filter-field :is(input,select):focus-visible { outline: 3px solid rgba(8,123,112,.25); outline-offset: 2px; }
#bankTransactionFilterForm > .admin-button { min-height: 44px; }
@media (max-width: 1000px) { :where(html:not(.cw-desktop-scale)) #bankTransactionFilterForm{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { :where(html:not(.cw-desktop-scale)) #bankTransactionFilterForm{ grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 12px; } }

/* FPG uses the same field and action styling as the other provider settings. */
#payoutGatewayCredentialsForm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--admin-line, #dce7e5); }
#payoutGatewayCredentialsForm > * { grid-column: 1 / -1; min-width: 0; margin: 0; }
#payoutGatewayCredentialsForm > label:has(#payoutGatewayBaseUrl),
#payoutGatewayCredentialsForm > label:has(#payoutGatewayCallbackUrl) { grid-column: auto; }
#payoutGatewayCredentialsForm .admin-field :is(input, textarea) { box-sizing: border-box; width: 100%; min-width: 0; }
#payoutGatewayCredentialsForm input[readonly] { background: var(--admin-ice, #f2f7f6); color: var(--admin-muted); }
#payoutGatewayCredentialsForm > .admin-dialog-actions { justify-content: flex-end; }
@media (max-width: 700px) {
  :where(html:not(.cw-desktop-scale)) #payoutGatewayCredentialsForm{ grid-template-columns: minmax(0, 1fr); }
}

/* Payout evidence: scoped to release and application history cards. */
.admin-payout-card { display:grid; gap:18px; padding:24px; min-width:0; }
.admin-payout-card p { margin:0; }
.admin-payout-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.admin-payout-status { display:inline-flex; padding:6px 10px; border-radius:6px; background:#edf3f4; color:#425a69; font-size:13px; font-weight:700; }
.admin-payout-status-needs_review,.admin-payout-status-unknown { background:#fff2d6; color:#805917; }
.admin-payout-status-succeeded { background:#e5f5ef; color:#246b55; }
.admin-payout-status-failed { background:#fcebea; color:#a8352b; }
.admin-payout-date,.admin-payout-label,.admin-payout-reference { color:var(--admin-muted,#657786); font-size:12px; line-height:1.5; }
.admin-payout-accounts { display:grid; grid-template-columns:1fr 1fr; gap:16px; padding:16px; background:#f6f9f9; border:1px solid var(--admin-line,#d9e2e7); border-radius:10px; }
.admin-payout-label { display:block; margin-bottom:6px; font-weight:600; }
.admin-payout-account { min-width:0; }
.admin-payout-account p { font-size:14px; line-height:1.65; overflow-wrap:anywhere; }
.admin-payout-meta { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; }
.admin-payout-amount { font-size:20px; font-variant-numeric:tabular-nums; }
.admin-payout-provider { font-size:12px; font-weight:700; color:var(--admin-muted,#657786); }
.admin-payout-meta .admin-payout-reference { flex-basis:100%; overflow-wrap:anywhere; }
.admin-payout-error { padding:12px 14px; border-left:3px solid #c65140; border-radius:6px; background:#fff3f0; color:#a53529; line-height:1.55; }
.admin-payout-error p { font-size:14px; }
.admin-payout-error code { display:block; margin-top:5px; font-size:11px; overflow-wrap:anywhere; }
.admin-payout-updates { border-top:1px solid var(--admin-line,#d9e2e7); padding-top:14px; }
.admin-payout-updates summary { cursor:pointer; font-size:13px; font-weight:600; color:#426573; }
.admin-payout-updates .admin-payout-update { margin:12px 0 0 5px; padding:2px 0 2px 14px; border-left:2px solid #d9e6e5; color:var(--admin-muted,#657786); font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.admin-payout-card > .admin-button { justify-self:end; }
@media(max-width:600px) { :where(html:not(.cw-desktop-scale)) .admin-payout-card{ padding:16px; gap:14px; } :where(html:not(.cw-desktop-scale)) .admin-payout-accounts{ grid-template-columns:1fr; gap:14px; padding:12px; } :where(html:not(.cw-desktop-scale)) .admin-payout-card > .admin-button{ width:100%; } }

.admin-release-holder dd { display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.admin-release-holder dd span { overflow-wrap:anywhere; }
.admin-release-holder .admin-button { min-height:36px; padding:6px 14px; font-size:13px; font-weight:600; }
#activateLoanReceiptField { margin-top:18px; gap:8px; }
#activateLoanReceipt { padding:10px; font:inherit; font-size:13px; border:1px solid var(--admin-line,#d9e2e7); border-radius:10px; background:#f7faf9; width:100%; min-width:0; }
#activateLoanReceipt::file-selector-button { margin-right:12px; padding:8px 14px; border:1px solid #b9d7d2; border-radius:7px; background:#eaf5f2; color:#28695f; font:inherit; font-weight:600; cursor:pointer; }
#activateLoanReceipt::file-selector-button:hover { background:#dcefe9; }
#activateLoanReceiptField > small { font-size:12px; line-height:1.6; color:var(--admin-muted,#657786); }

/* Item 324: receipt upload progress stays above the Release actions, outside the scrolling body. */
#activateLoanUploadProgress { display:grid; gap:6px; margin:0; padding:8px 24px 0; }
#activateLoanUploadProgress.admin-hidden { display:none !important; }
.admin-upload-progress-meta { display:flex; justify-content:space-between; align-items:baseline; gap:12px; color:var(--admin-ink); font-size:13px; font-weight:700; }
.admin-upload-progress-track { height:12px; overflow:hidden; border:1px solid var(--admin-line); border-radius:999px; background:var(--admin-ice); }
.admin-upload-progress-bar { width:0%; height:100%; border-radius:inherit; background:var(--admin-teal); transition:width 120ms linear; }
.admin-upload-progress-bar.is-indeterminate { width:40%; animation:admin-upload-indeterminate 1.1s ease-in-out infinite; }
.admin-upload-progress-size { margin:0; color:var(--admin-muted); font-size:12px; font-weight:650; }
.admin-upload-progress-size.admin-hidden { display:none !important; }
@keyframes admin-upload-indeterminate { 0% { transform:translateX(-120%); } 100% { transform:translateX(280%); } }
@media (prefers-reduced-motion: reduce) {
  .admin-upload-progress-bar { transition:none; }
  .admin-upload-progress-bar.is-indeterminate { animation:none; width:100%; opacity:.6; }
}
@media (max-width: 680px) { :where(html:not(.cw-desktop-scale)) #activateLoanUploadProgress{ padding:8px 16px 0; } }

/* Compact release workspace: compare sender and recipient without scrolling. */
#activateLoanDialog { width:min(980px,calc(calc(100 * var(--cw-vw)) - 32px)); height:auto; max-height:calc(calc(100 * var(--cw-dvh)) - 32px); }
#activateLoanDialog form { max-height:calc(calc(100 * var(--cw-dvh)) - 32px); }
#activateLoanDialog .admin-release-dialog-body { padding:20px 24px; }
.admin-release-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
#activateLoanDialog .admin-release-heading h2 { margin:0; font-size:24px; }
#activateLoanDialog .admin-release-close { min-width:36px; min-height:36px; padding:0; font-size:24px; }
.admin-release-reference { display:flex; align-items:center; gap:12px; margin:4px 0 20px; color:var(--admin-muted,#657786); font-size:12px; }
#activateLoanDialog .admin-release-reference input { width:auto; flex:1; min-width:0; border:0; background:transparent; padding:0; min-height:24px; height:24px; font-size:12px; color:inherit; }
.admin-release-columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; align-items:start; }
.admin-release-sender-column { display:grid; gap:16px; min-width:0; }
#activateLoanDialog .admin-release-sender-column .admin-field { margin:0; gap:7px; }
#activateLoanDialog .admin-release-sender-column small { font-size:12px; line-height:1.5; }
#activateLoanDialog select { min-height:44px; font-size:14px; }
#activateLoanDialog textarea { min-height:64px; font-size:14px; }
#activateLoanDialog .admin-release-recipient { margin:0; padding:16px; }
#activateLoanDialog .admin-release-recipient-grid { grid-template-columns:1fr; gap:12px; }
#activateLoanDialog .admin-release-recipient-grid > div { background:transparent; padding:0; }
#activateLoanDialog .admin-release-recipient-grid dt { font-size:12px; }
#activateLoanDialog .admin-release-recipient-grid dd { font-size:15px; font-weight:600; margin-top:4px; }
#activateLoanDialog .admin-release-holder dd { flex-direction:row; align-items:center; justify-content:space-between; }
#activateLoanDialog .admin-release-holder dd span { min-width:0; }
#activateLoanDialog .admin-release-recipient .admin-button { flex-shrink:0; min-height:36px; padding:6px 10px; font-size:12px; }
#activateLoanDialog .admin-release-warning { font-size:12px; padding:9px 10px; }
#activateLoanDialog #activateLoanApprovedPayout { font-size:24px; font-weight:750; }
.admin-release-disclosure { margin-top:16px; border-top:1px solid var(--admin-line,#d9e2e7); padding-top:12px; }
.admin-release-disclosure > summary { cursor:pointer; font-size:13px; font-weight:600; color:#426573; }
.admin-release-disclosure > p,.admin-release-disclosure > small { font-size:13px; line-height:1.5; }
#activateLoanDialog #activateLoanStatus:not(:empty) { margin:16px 0 8px; padding:10px 12px; border-radius:8px; background:#fff5d9; color:#6f5212; font-size:13px; }
#activateLoanDialog #disapproveBeforePayoutButton { display:none !important; }
#activateLoanDialog .admin-dialog-actions { justify-content:flex-end; flex-wrap:nowrap; }
@media(max-width:680px) { :where(html:not(.cw-desktop-scale)) #activateLoanDialog{ width:calc(calc(100 * var(--cw-vw)) - 16px); } :where(html:not(.cw-desktop-scale)) #activateLoanDialog .admin-release-dialog-body{ padding:16px; } :where(html:not(.cw-desktop-scale)) .admin-release-columns{ grid-template-columns:1fr; gap:16px; } :where(html:not(.cw-desktop-scale)) #activateLoanDialog .admin-release-account dd{ flex-direction:row; align-items:center; } :where(html:not(.cw-desktop-scale)) #activateLoanDialog .admin-release-account .admin-button{ width:auto; } :where(html:not(.cw-desktop-scale)) #activateLoanDialog .admin-dialog-actions .admin-button{ flex:0 1 auto; } }

#activateLoanDialog #activateLoanForm { display:flex; flex-direction:column; height:auto; }
#activateLoanDialog .admin-release-dialog-body { flex:1 1 auto; }

#activateLoanDialog { height:fit-content; }

.admin-fpg-reconciliation-table { table-layout:auto; min-width:1100px; }
.admin-fpg-reconciliation-table :is(th,td) { overflow:visible; text-overflow:clip; white-space:normal; overflow-wrap:anywhere; }
.admin-fpg-reconciliation-table :is(th,td):nth-child(7) { min-width:180px; max-width:260px; }
.admin-fpg-reconciliation-action input { box-sizing:border-box; padding:10px 12px; border:1px solid var(--admin-line); border-radius:8px; background:#fff; color:var(--admin-ink); font:inherit; font-size:13px; }
@media(max-width:680px) { :where(html:not(.cw-desktop-scale)) .admin-fpg-reconciliation-table{ min-width:0; } :where(html:not(.cw-desktop-scale)) .admin-fpg-reconciliation-table :is(th,td):nth-child(7){ min-width:0; max-width:none; } }

.admin-table-region .admin-fpg-reconciliation-table :is(th,td):last-child { position:static; right:auto; box-shadow:none; }
.admin-fpg-reconciliation-table th { white-space:nowrap; overflow-wrap:normal; }

.admin-payout-outcomes { padding:0; margin:18px 0; border:0; display:grid; gap:10px; }
/* Keep payout content at its natural height inside the scrolling form.
   WebKit can compress auto grid rows below the warning's content height. */
.admin-finance-dialog > .admin-dialog-card:has(.admin-payout-outcomes) { display:block; }
.admin-payout-outcomes legend { font-size:13px; font-weight:600; margin-bottom:10px; }
.admin-payout-outcome { display:flex; align-items:flex-start; gap:10px; padding:14px; border:1px solid var(--admin-line,#d9e2e7); border-radius:9px; cursor:pointer; font-size:14px; line-height:1.5; }
.admin-payout-outcome:has(input:checked) { border-color:#348d80; background:#eff8f5; }
.admin-payout-outcome input[type=radio] { flex:0 0 18px; width:18px; height:18px; min-height:18px; margin:2px 0 0; accent-color:#348d80; }

.admin-payout-resolution-warning { margin:16px 0 20px; padding:14px 16px; border:1px solid #e6cc86; border-left:4px solid #c59125; border-radius:9px; background:#fff6dc; color:#684b11; font-size:13px; line-height:1.6; }
.admin-payout-resolution-warning strong { display:block; font-size:14px; }
.admin-payout-resolution-warning p { margin:8px 0 0; }
.admin-payout-resolution-warning .admin-payout-attempt-time { padding-top:9px; border-top:1px solid #ead9ad; font-weight:600; font-size:12px; }

.admin-payout-resolution-warning .admin-payout-elapsed { display:inline-block; margin-left:4px; padding:2px 8px; border:1px solid #edb6af; border-radius:6px; background:#fde6e2; color:#a42b20; font-size:13px; font-weight:800; white-space:nowrap; }

@keyframes admin-payout-elapsed-pulse {
  0%,100% { box-shadow:0 0 0 0 rgba(164,43,32,0); }
  50% { box-shadow:0 0 0 4px rgba(164,43,32,.16); }
}
.admin-payout-resolution-warning .admin-payout-elapsed { animation:admin-payout-elapsed-pulse 2.4s ease-in-out infinite; }
@media(prefers-reduced-motion:reduce) { .admin-payout-resolution-warning .admin-payout-elapsed { animation:none; } }

@keyframes admin-bank-check-point-left { 0%,100% { transform:translateX(0); } 50% { transform:translateX(4px); } }
@keyframes admin-bank-check-point-right { 0%,100% { transform:translateX(0); } 50% { transform:translateX(-4px); } }
.admin-finance-dialog .admin-bank-check-title { display:flex; align-items:center; justify-content:center; gap:12px; }
.admin-bank-check-text { min-width:0; text-align:center; }
.admin-bank-check-finger { flex:0 0 auto; font-size:20px; line-height:1; }
.admin-bank-check-finger-left { animation:admin-bank-check-point-left 1.6s ease-in-out infinite; }
.admin-bank-check-finger-right { animation:admin-bank-check-point-right 1.6s ease-in-out infinite; }
@media(prefers-reduced-motion:reduce) { .admin-bank-check-finger { animation:none; } }

.admin-finance-dialog .admin-bank-check-title .admin-bank-check-text { color:#a42b20; }

@keyframes admin-bank-title-shimmer {
  0%,15% { transform:translateX(-120%); }
  85%,100% { transform:translateX(120%); }
}
.admin-bank-check-title .admin-bank-check-text { position:relative; overflow:hidden; }
.admin-bank-check-title .admin-bank-check-text::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(110deg,transparent 30%,rgba(255,255,255,.5) 50%,transparent 70%);
  transform:translateX(-120%); animation:admin-bank-title-shimmer 2s ease-in-out infinite;
}
@media(prefers-reduced-motion:reduce) { .admin-bank-check-title .admin-bank-check-text::after { display:none; animation:none; } }

.admin-finance-dialog .admin-bank-check-title { font-size:23px; line-height:1.35; }
@media(max-width:480px) { :where(html:not(.cw-desktop-scale)) .admin-finance-dialog .admin-bank-check-title{ font-size:21px; } }

.admin-payout-outcomes-invalid .admin-payout-outcome { border-color:#c94c3e; background:#fff5f3; }
@keyframes admin-bank-title-zoom { 0%,100% { transform:scale(1); } 50% { transform:scale(1.06); } }
.admin-bank-check-title .admin-bank-check-text { animation:admin-bank-title-zoom 1s ease-in-out infinite; }
@media(prefers-reduced-motion:reduce) { .admin-bank-check-title .admin-bank-check-text { animation:none; } }

.admin-payout-warning-meta { display:flex; align-items:center; gap:12px; margin-top:12px; padding-top:12px; border-top:1px solid #ead9ad; }
.admin-payout-warning-meta .admin-payout-attempt-time { flex:1; min-width:0; margin:0; padding:0; border:0; }
.admin-finance-dialog .admin-payout-lookup { display:inline-flex; align-items:center; justify-content:center; gap:6px; flex-shrink:0; min-height:36px; margin:0; padding:7px 10px; border:1px solid #dfcb96; border-radius:8px; background:#fffaf0; color:#73551c; font-size:12px; font-weight:700; line-height:1.3; white-space:nowrap; }
.admin-finance-dialog .admin-payout-lookup:hover { background:#fff; border-color:#b48c3e; }
.admin-payout-lookup-icon { font-size:18px; line-height:1; }
.admin-payout-resolution-warning [role="status"]:empty { display:none; }
@media(max-width:480px) {
  :where(html:not(.cw-desktop-scale)) .admin-payout-warning-meta{ display:grid; grid-template-columns:minmax(0,1fr); }
  :where(html:not(.cw-desktop-scale)) .admin-finance-dialog .admin-payout-lookup{ width:100%; min-height:44px; margin-left:0; white-space:normal; }
}

/* Shared read-only repayment history in application details and Client 360. */
.admin-customer-repayments { display: grid; gap: 0; min-width: 0; }
.admin-customer-repayment { padding: 14px 0; border-bottom: 1px solid var(--admin-border); min-width: 0; }
.admin-customer-repayment:last-child { border-bottom: 0; }
.admin-customer-repayment-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.admin-customer-repayment-heading time { margin-right: auto; }
.admin-customer-repayment-details { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 10px 0 6px; }
.admin-customer-repayment-details > div { min-width: 0; max-width: 100%; }
.admin-customer-repayment-details dt { color: var(--admin-muted); font-size: 12px; }
.admin-customer-repayment-details dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.admin-customer-repayment-paid { color: var(--admin-success); background: var(--admin-success-bg); }
.admin-customer-repayment-failed { color: var(--admin-danger); background: var(--admin-danger-bg); }
.admin-customer-repayment-pending { color: var(--admin-info); background: var(--admin-info-bg); }
.admin-customer-repayment-needs_review { color: var(--admin-warning); background: var(--admin-warning-bg); }
.admin-customer-repayment-reversed { color: var(--admin-muted); background: #edf1f3; }
@media (max-width: 600px) {
  :where(html:not(.cw-desktop-scale)) .admin-customer-repayment-heading time{ flex-basis: 100%; }
  :where(html:not(.cw-desktop-scale)) .admin-customer-repayment-details{ display: grid; grid-template-columns: 1fr; }
}

.admin-customer-repayment-heading .admin-repayment-manual-check { min-height: 28px; padding: 4px 10px; font-size: 12px; line-height: 1.4; border-radius: 999px; white-space: nowrap; }

/* Keep the open All loans menu above neighboring sticky action cells. */
#loanTableRegion .admin-table-action-cell.admin-action-menu-open { z-index: 1301; }

/* Keep all manual transaction directions visible, including bank transfers. */
.admin-bank-transaction-dialog .admin-bank-direction-field {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.admin-bank-transaction-dialog .admin-bank-direction-field legend {
  margin-bottom: 8px;
  font-weight: 700;
}
.admin-bank-transaction-dialog .admin-bank-direction {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 8px;
}
.admin-bank-transaction-dialog .admin-bank-direction-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--admin-border, #c5d7d7);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
}
.admin-bank-transaction-dialog .admin-bank-direction-choice:has(input:checked) {
  background: #e8f5f1;
  border-color: #418f83;
  color: #25675f;
  font-weight: 700;
}
.admin-bank-transaction-dialog .admin-bank-direction-choice:has(input:focus-visible) {
  outline: 3px solid #91c9c0;
  outline-offset: 2px;
}
.admin-bank-transaction-dialog .admin-bank-direction-choice input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  flex: 0 0 18px;
  accent-color: #418f83;
}

/* A title-only bank transaction header needs no reserved icon/help area. */
.admin-bank-transaction-dialog .admin-dialog-header {
  min-height: 0;
  padding: 16px 24px;
  align-items: center;
}
.admin-bank-transaction-dialog .admin-dialog-header-copy h2 { margin: 0; }

/* Keep the account correction beside the account, without expanding the reason. */
#bankTransactionRows .admin-bank-account-cell { min-width: 160px; }
.admin-bank-account-picker { align-self: start; }
.admin-bank-account-suggestions {
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  margin: 6px 0 0;
  padding: 6px;
  list-style: none;
  border: 1px solid rgba(48, 103, 96, 0.28);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(13, 42, 58, 0.12);
}
.admin-bank-account-suggestions li {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--admin-ink, #132844);
  cursor: pointer;
}
.admin-bank-account-suggestions li:hover,
.admin-bank-account-suggestions li.active,
.admin-bank-account-suggestions li[aria-selected="true"] {
  background: rgba(74, 151, 137, 0.14);
}
.admin-bank-account-suggestions li.active { box-shadow: inset 3px 0 0 #4a9789; }
.admin-bank-account-content { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.admin-bank-account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.admin-bank-edit-badge {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 4px;
  background: #edf3f5;
  color: #526775;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
}
.admin-bank-edit-badge:hover { text-decoration: underline; }
.admin-bank-edit-badge:focus-visible { outline: 2px solid #448e84; outline-offset: 2px; }
.admin-account-history-dialog { width: min(720px, calc(calc(100 * var(--cw-vw)) - 32px)); max-height: calc(85 * var(--cw-vh)); padding: 24px; box-sizing: border-box; overflow: auto; }
.admin-account-history-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-account-history-header h2 { margin: 0; font-size: 22px; }
.admin-account-history-reference { color: #526775; font-size: 13px; overflow-wrap: anywhere; }
.admin-account-history-list { list-style: none; padding: 0; margin: 16px 0 0; }
.admin-account-history-list li { padding: 16px 0; border-top: 1px solid #dce5e7; }
.admin-account-history-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; flex-wrap: wrap; }
.admin-account-history-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 14px 0; font-size: 13px; }
.admin-account-history-accounts dt { margin-bottom: 4px; }
.admin-account-history-accounts dd { margin: 0; overflow-wrap: anywhere; }
.admin-account-history-reason { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  :where(html:not(.cw-desktop-scale)) .admin-account-history-dialog{ padding: 16px; }
  :where(html:not(.cw-desktop-scale)) .admin-account-history-accounts{ grid-template-columns: 1fr; gap: 12px; }
}
#bankTransactionRows .admin-bank-account-action {
  width: auto;
  min-width: 0;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 760px) {
  :where(html:not(.cw-desktop-scale)) #bankTransactionRows .admin-bank-account-action{ min-height: 44px; }
}

/* Keep bank gateway identities readable without expanding transaction rows. */
#bankAccountRows .admin-bank-gateway { display: grid; gap: 2px; min-width: max-content; line-height: 1.4; }
#bankAccountRows .admin-bank-gateway > span { white-space: nowrap; }
#bankAccountRows .admin-bank-gateway-name { font-weight: 600; }
#bankAccountRows .admin-bank-gateway-binding { font-size: 12px; color: var(--admin-muted); }

/* Inline secondary edits keep the value and pencil on the same line. */
#bankTransactionRows .admin-bank-inline-value { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
#bankTransactionRows .admin-bank-inline-value > span { min-width: 0; }
#bankTransactionRows .admin-bank-inline-amount { white-space: nowrap; }
#bankTransactionRows .admin-bank-edit-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; min-height: 28px; padding: 5px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #287b70; cursor: pointer; }
#bankTransactionRows .admin-bank-edit-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#bankTransactionRows .admin-bank-edit-icon:hover { background: #eaf5f2; border-color: #bfd9d4; }
#bankTransactionRows .admin-bank-edit-icon:focus-visible { outline: 2px solid #448e84; outline-offset: 2px; }

/* FPG jobs stay visible across workspaces until their local state is resolved. */
.admin-fpg-pending-alert { margin: 0 0 18px; padding: 14px 16px; border: 1px solid #d6ac43; border-radius: 8px; background: #fff8e6; color: #503b12; font-size: 13px; line-height: 1.45; }
.admin-fpg-pending-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-fpg-pending-heading > strong { font-size: 14px; }
.admin-fpg-pending-alert > p { margin: 8px 0; }
.admin-fpg-pending-alert > small { display: block; font-size: 12px; }
.admin-fpg-pending-alert summary { display: flex; align-items: center; width: fit-content; min-height: 44px; cursor: pointer; font-weight: 600; text-decoration: underline; }
.admin-fpg-pending-alert summary:focus-visible { outline: 2px solid #503b12; outline-offset: 2px; }
.admin-fpg-pending-alert .admin-table-region { max-height: 360px; overflow: auto; background: #fff; }
.admin-fpg-pending-table { min-width: 720px; }
@media (max-width: 700px) {
  :where(html:not(.cw-desktop-scale)) .admin-fpg-pending-alert{ padding: 12px; }
  :where(html:not(.cw-desktop-scale)) .admin-fpg-pending-table{ min-width: 0; }
  :where(html:not(.cw-desktop-scale)) .admin-fpg-pending-table td{ min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  :where(html:not(.cw-desktop-scale)) .admin-fpg-pending-table td > *{ min-width: 0; }
  :where(html:not(.cw-desktop-scale)) .admin-fpg-pending-alert .admin-button{ min-height: 44px; }
}

/* Registration banks are maintained separately from company cash accounts. */
.admin-bank-catalogue-toolbar { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.admin-bank-catalogue-toolbar .admin-field { flex: 1 1 220px; margin: 0; }
.admin-bank-catalogue-toolbar > button { margin-bottom: 2px; }
.admin-bank-catalogue-code { display: block; margin-top: 5px; color: var(--admin-muted); }
.admin-bank-catalogue-table { min-width: 580px; }
#bankCatalogueCard { width: 100%; }


.admin-bank-options.admin-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.admin-bank-options legend { color: #33485f; font-size: 12px; font-weight: 750; margin-bottom: 12px; }
.admin-bank-option-list { display: flex; gap: 12px; flex-wrap: wrap; }
.admin-bank-option { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
:is(#bankAccountDialog, .admin-bank-transaction-dialog) .admin-bank-options .admin-bank-option input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; padding: 0; accent-color: var(--admin-teal); }
.admin-dialog.admin-bank-catalogue-dialog { max-height: calc(calc(100 * var(--cw-dvh)) - 28px); }
.admin-dialog.admin-bank-catalogue-dialog > form.admin-dialog-structure { max-height: calc(calc(100 * var(--cw-dvh)) - 28px); min-height: 0; }
/* Gateway comparison matrix and compact single-bank editor. */
#bankGatewayMatrixCard { min-width: 0; max-width: 100%; }
.admin-bank-matrix-table { min-width: 100%; width: max-content; }
.admin-bank-matrix-table th, .admin-bank-matrix-table td { min-width: 155px; max-width: 240px; }
.admin-bank-matrix-table th:first-child, .admin-bank-matrix-table td:first-child { position: sticky; left: 0; z-index: 1; min-width: 165px; background: var(--admin-paper); }
.admin-bank-matrix-table th:last-child, .admin-bank-matrix-table td:last-child { position: sticky; right: 0; z-index: 1; min-width: 85px; background: var(--admin-paper); }
.admin-bank-matrix-table th:first-child, .admin-bank-matrix-table th:last-child { background: #f8fafb; z-index: 2; }
.admin-bank-matrix-code { overflow-wrap: anywhere; }
.admin-bank-matrix-provider { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.admin-bank-matrix-provider .admin-bank-matrix-refresh { min-width: 36px; min-height: 36px; padding: 4px 8px; font-size: 18px; }
.admin-bank-matrix-table .admin-button { white-space: nowrap; }
.admin-bank-row-editor { display: grid; gap: 0; }
.admin-bank-row-fields { display: grid; grid-template-columns: 100px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--admin-line); }
.admin-bank-row-fields:last-child { border-bottom: 0; }
.admin-bank-row-name { min-width: 0; overflow-wrap: anywhere; }
.admin-bank-row-fields .admin-field { margin: 0; }
.admin-bank-row-fields .admin-bank-option-list { gap: 10px; }
.admin-bank-row-fields .admin-bank-option { font-size: 13px; }
.admin-bank-row-fields .admin-bank-option input { width: 18px; height: 18px; accent-color: var(--admin-teal); }
@media (max-width: 700px) {
  :where(html:not(.cw-desktop-scale)) #bankGatewayMatrixTable{ display: table; min-width: 100%; }
  :where(html:not(.cw-desktop-scale)) #bankGatewayMatrixTable thead{ display: table-header-group; }
  :where(html:not(.cw-desktop-scale)) #bankGatewayMatrixTable tbody{ display: table-row-group; }
  :where(html:not(.cw-desktop-scale)) #bankGatewayMatrixTable tr{ display: table-row; }
  :where(html:not(.cw-desktop-scale)) #bankGatewayMatrixTable th, :where(html:not(.cw-desktop-scale)) #bankGatewayMatrixTable td{ display: table-cell; min-width: 145px; }
  :where(html:not(.cw-desktop-scale)) #bankGatewayMatrixTable td::before{ display: none; }
  :where(html:not(.cw-desktop-scale)) #bankGatewayMatrixTable th:first-child, :where(html:not(.cw-desktop-scale)) #bankGatewayMatrixTable td:first-child{ min-width: 110px; max-width: 130px; }
  :where(html:not(.cw-desktop-scale)) #bankGatewayMatrixTable th:last-child, :where(html:not(.cw-desktop-scale)) #bankGatewayMatrixTable td:last-child{ min-width: 76px; }
  :where(html:not(.cw-desktop-scale)) .admin-bank-row-fields{ grid-template-columns: 82px minmax(0,1fr); }
  :where(html:not(.cw-desktop-scale)) .admin-bank-row-fields .admin-bank-option-list{ grid-column: 2; }
  :where(html:not(.cw-desktop-scale)) .admin-bank-matrix-provider .admin-bank-matrix-refresh{ min-width: 44px; min-height: 44px; }
  /* Override the shared full-screen mobile dialog for this short row editor. */
  :where(html:not(.cw-desktop-scale)) .admin-dialog.admin-dialog-structure.admin-bank-mapping-dialog{ width: calc(calc(100 * var(--cw-vw)) - 24px); max-width: calc(calc(100 * var(--cw-vw)) - 24px); min-height: 0; height: fit-content !important; max-height: calc(calc(100 * var(--cw-dvh)) - 28px); margin: auto; border-radius: 16px; }
  :where(html:not(.cw-desktop-scale)) .admin-dialog.admin-bank-mapping-dialog > form.admin-dialog-structure{ height: auto; max-height: calc(calc(100 * var(--cw-dvh)) - 28px); }
}

/* Item 305 bundle: decided-view accordion. Sections inside a decided disclosure drop their
   own outer border/radius/shadow (tables, SMS history, summaries included) and the inner
   heading that only repeats the disclosure label is hidden. */
.admin-decided-disclosure>:not(summary){margin:0;border-width:1px 0 0;border-radius:0;box-shadow:none}
.admin-decided-disclosure>:not(summary):not(.admin-detail-card){padding:12px 16px}
.admin-decided-disclosure>.admin-review-applications{overflow-x:auto}
.admin-decided-disclosure>.admin-review-applications>h3:first-child,.admin-decided-disclosure>.admin-financial-summary .admin-client360-section-heading-copy>h3,.admin-decided-disclosure>.admin-sms-history-section .admin-client360-section-heading-copy>h3,.admin-decided-disclosure>.admin-inline-comparison .admin-inline-comparison-heading h3{display:none}
/* Item 306: client page SMS history + Recent activity collapsed disclosures. The inner
   section drops its own card chrome and the h3 that repeats the disclosure label. */
.admin-client360>.admin-client360-disclosure{margin:0}
.admin-client360-disclosure>.admin-client360-section{margin:0;padding:12px 16px;border-width:1px 0 0;border-radius:0;box-shadow:none}
.admin-client360-disclosure>.admin-client360-section .admin-client360-section-heading-copy>h3{display:none}
/* Item 308 (All loans pilot): stacked Amounts / Dates cells. The Sort by
   dropdown is shown on desktop for All loans only (it stays hidden above
   760px on every other tab), so sort keys whose headers were folded into a
   stack (principal, released) stay reachable. Six-column width map sums to
   100%; the table keeps auto layout so the Actions buttons are never clipped. */
#loanFilterForm .admin-list-sort-field{display:flex}
#loanTableRegion .admin-stacked-lines{display:grid;gap:2px;min-width:0}
#loanTableRegion .admin-stacked-line{display:flex;align-items:baseline;gap:4px;white-space:nowrap}
#loanTableRegion .admin-stacked-label{color:#607784;font-size:.78em;font-weight:650}
#loanTableRegion .admin-loan-amounts .admin-stacked-value{font-weight:750}
#loanTableRegion .admin-loan-dates .admin-stacked-value{font-weight:500}
/* Item 317: the same Principal / Outstanding (or Total due) / Days stack on the
   application tables and the 5 loan-family tabs. Class-scoped (.admin-amounts-stack),
   label and value styled like the All-loans Amounts stack above; a narrow column
   wraps the value under its label instead of clipping it. */
.admin-amounts-stack.admin-stacked-lines{display:grid;gap:2px;min-width:0}
.admin-amounts-stack .admin-stacked-line{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:4px;row-gap:0;min-width:0}
.admin-amounts-stack .admin-stacked-label{color:#607784;font-size:.78em;font-weight:650;white-space:nowrap}
.admin-amounts-stack .admin-stacked-value{font-weight:750;white-space:nowrap}
/* Item 320: on the application tables (Pending approval + All applications) the
   generic `.admin-application-table .admin-cell-stack{grid-auto-flow:column}` rule
   laid the three stacked lines out as side-by-side grid COLUMNS in the narrow
   Package column, so Principal / Total due / Days overlapped. Restore row flow so
   each line stacks vertically, matching the All-loans Amounts cell. */
.admin-application-table .admin-amounts-stack.admin-stacked-lines{grid-auto-flow:row;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:2px}
/* Item 322: on the application tables each stacked line keeps its label and
   value on ONE line ("Principal: RM 160.00"), like the All-loans Amounts
   cell; the Package column above is wide enough to hold the longest line. */
.admin-application-table .admin-amounts-stack .admin-stacked-line{flex-wrap:nowrap;white-space:nowrap}
/* Item 319: the merged 2-line Dates cell (Released / Due date) on Collection
   queue, Bad debt queue and Future collections. Same grid/label as the shared
   amounts stack; date values use the lighter weight of the All-loans Dates
   cell (#loanTableRegion .admin-loan-dates .admin-stacked-value is 500). */
.admin-dates-stack.admin-stacked-lines{display:grid;gap:2px;min-width:0}
.admin-dates-stack .admin-stacked-line{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:4px;row-gap:0;min-width:0}
.admin-dates-stack .admin-stacked-label{color:#607784;font-size:.78em;font-weight:650;white-space:nowrap}
.admin-dates-stack .admin-stacked-value{font-weight:500;white-space:nowrap}
/* Item 381: seven-column All loans width map (Loan/client, Amounts, Received,
   Dates, Released by, Status, Actions). Released by stays a narrow 90–110px
   column with ellipsis; existing values stay visible.
   Item 477: Item 381's 9% Status + 20% Actions (~98px + 218px at the
   desktop-scaled 1024/1440 content width) could not hold the three
   one-line Actions controls. View details + Record repayment + More
   actions need ~392px at the redesign button size, and .admin-table-actions
   min-width:max-content (plus visible overflow on the sticky-right cell)
   let that row paint over the Status pill. Status also had no min-width
   (the All loans cell is not .admin-col-status). Status is now a fixed
   7rem so Active / Overdue / Settled (and ZH 正常 / 逾期 / 已结清) stay
   fully visible with a gap before Actions. Actions is a fixed 19.75rem
   and the three controls are compacted (same 10px / 5px 7px treatment
   as Repayment history) with nowrap and min-width:0 so they stay inside
   the cell. Percentage columns (Loan + Amounts + Dates) sum
   to 41%. Rem+px columns are Actions 19.75 + Status 7 + Received 6.75
   + Released 100px = 636px; table min-width is 67.5rem (636 / 0.59 = 1078, with slack)
   so those columns are not squeezed. The region may scroll internally
   below that floor; there is no page-level horizontal scroll at 1440
   or 1024. Repayment history widths from Items 473–476 are unchanged. */
#loanTableRegion{overflow-x:auto;max-width:100%}
#loanTableRegion .admin-table{width:100%;table-layout:fixed;min-width:67.5rem}
#loanTableRegion .admin-table th,#loanTableRegion .admin-table td{padding:12px 10px}
#loanTableRegion .admin-loan-released-by{
  width:100px;min-width:90px;max-width:110px;box-sizing:border-box
}
#loanTableRegion .admin-loan-released-by-name{
  display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:110px
}
@media(min-width:761px){
  #loanTableRegion .admin-table th:nth-child(1),#loanTableRegion .admin-table td:nth-child(1){width:16%}
  #loanTableRegion .admin-table th:nth-child(2),#loanTableRegion .admin-table td:nth-child(2){width:13%}
  #loanTableRegion .admin-table th:nth-child(3),#loanTableRegion .admin-table td:nth-child(3){width:6.75rem;min-width:6.75rem}
  #loanTableRegion .admin-table th:nth-child(4),#loanTableRegion .admin-table td:nth-child(4){width:12%}
  #loanTableRegion .admin-table th:nth-child(5),#loanTableRegion .admin-table td:nth-child(5){width:100px;min-width:90px;max-width:110px}
  #loanTableRegion .admin-table th:nth-child(6),#loanTableRegion .admin-table td:nth-child(6){width:7rem;min-width:7rem}
  #loanTableRegion .admin-table th:nth-child(7),#loanTableRegion .admin-table td:nth-child(7){width:19.75rem;min-width:19.75rem}
}
:where(html.cw-desktop-scale) #loanTableRegion .admin-table th:nth-child(1), :where(html.cw-desktop-scale) #loanTableRegion .admin-table td:nth-child(1){width:16%}
:where(html.cw-desktop-scale) #loanTableRegion .admin-table th:nth-child(2), :where(html.cw-desktop-scale) #loanTableRegion .admin-table td:nth-child(2){width:13%}
:where(html.cw-desktop-scale) #loanTableRegion .admin-table th:nth-child(3), :where(html.cw-desktop-scale) #loanTableRegion .admin-table td:nth-child(3){width:6.75rem;min-width:6.75rem}
:where(html.cw-desktop-scale) #loanTableRegion .admin-table th:nth-child(4), :where(html.cw-desktop-scale) #loanTableRegion .admin-table td:nth-child(4){width:12%}
:where(html.cw-desktop-scale) #loanTableRegion .admin-table th:nth-child(5), :where(html.cw-desktop-scale) #loanTableRegion .admin-table td:nth-child(5){width:100px;min-width:90px;max-width:110px}
:where(html.cw-desktop-scale) #loanTableRegion .admin-table th:nth-child(6), :where(html.cw-desktop-scale) #loanTableRegion .admin-table td:nth-child(6){width:7rem;min-width:7rem}
:where(html.cw-desktop-scale) #loanTableRegion .admin-table th:nth-child(7), :where(html.cw-desktop-scale) #loanTableRegion .admin-table td:nth-child(7){width:19.75rem;min-width:19.75rem}
/* Item 477: keep the three Actions controls on one line INSIDE the cell,
   and keep the sticky-right Actions background from painting over Status. */
#loanTableRegion .admin-table th:nth-child(7),
#loanTableRegion .admin-table td:nth-child(7) {
  overflow: hidden;
  background: #fff;
  box-sizing: border-box;
}
#loanTableRegion .admin-table th:nth-child(7) { background: #f8fafb; }
#loanTableRegion .admin-table tbody tr:hover td:nth-child(7) { background: #f9fcfc; }
#loanTableRegion .admin-table-action-cell.admin-action-menu-open { overflow: visible; }
#loanTableRegion .admin-table td:nth-child(7) .admin-table-actions {
  min-width: 0; flex-wrap: nowrap; gap: 4px; justify-content: flex-end; white-space: nowrap;
}
#loanTableRegion .admin-table td:nth-child(7) .admin-table-actions > * {
  flex: 0 0 auto; white-space: nowrap;
}
#loanTableRegion .admin-table td:nth-child(7) .admin-button,
#loanTableRegion .admin-table td:nth-child(7) .admin-action-menu-trigger,
#loanTableRegion .admin-table td:nth-child(7) .admin-action-menu > summary {
  padding: 5px 7px; font-size: 10px; min-height: 32px; min-width: 0; white-space: nowrap;
}

#loanTableRegion .admin-table td:nth-child(2),
#loanTableRegion .admin-table td:nth-child(3),
#loanTableRegion .admin-table td:nth-child(4) { overflow: hidden; }
#loanTableRegion .admin-loan-amounts .admin-stacked-line,
#loanTableRegion .admin-loan-dates .admin-stacked-line {
  flex-wrap: wrap; white-space: normal;
}
#loanTableRegion .admin-loan-amounts .admin-stacked-value,
#loanTableRegion .admin-loan-dates .admin-stacked-value { white-space: nowrap; }
#loanTableRegion .admin-table td:nth-child(6) .admin-status-badge { white-space: nowrap; }

/* Item 310: staff-only client remark card + compact bypass badge row. */
.admin-client-remark-card {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid #d7dde8;
  border-left: 4px solid #4a5f86;
  border-radius: 10px;
  background: #f7f9fc;
}
.admin-client-remark-title { margin: 0 0 6px; font-size: 13px; font-weight: 800; color: #24324d; }
.admin-client-remark-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; color: #1f2a3d; }
.admin-client-remark-empty { margin: 0; font-size: 12px; color: #7a8599; font-style: italic; }
.admin-client-remark-meta { display: block; margin-top: 6px; font-size: 11px; color: #6b7588; }
.admin-client-remark-form { display: grid; gap: 8px; margin-top: 8px; }
.admin-client-remark-form textarea { width: 100%; min-height: 72px; resize: vertical; font: inherit; }
.admin-bypass-inline-badges { display: flex; margin: 0 0 14px; align-items: center; gap: 7px; flex-wrap: wrap; }
.admin-bypass-inline-badges .admin-bypass-review-icon { width: 20px; height: 20px; font-size: 11px; }

/* Item 351 Part B: Settings > Application steps. */
.admin-application-form-groups { display: grid; gap: 16px; margin-top: 12px; }
.admin-application-form-group { border: 1px solid var(--admin-border, #dfe3ea); border-radius: 12px; padding: 12px 16px; background: var(--admin-surface, #fff); min-width: 0; }
.admin-application-form-group > h4 { margin: 0 0 8px; font-size: 1rem; }
.admin-application-form-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--admin-border-soft, #eef1f5); min-width: 0; }
.admin-application-form-row:first-of-type { border-top: 0; }
.admin-application-form-row-nested { padding-left: 24px; }
.admin-application-form-copy { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.admin-application-form-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.admin-application-form-row > .admin-setting-status, .admin-application-form-row > .admin-application-form-hint { flex: 1 1 100%; margin: 0; }
.admin-application-form-row-disabled, .admin-application-form-row-locked { opacity: 0.6; }
.admin-application-form-locked { white-space: nowrap; }
.admin-application-steps .admin-document-step-settings { margin-top: 20px; }
@media (max-width: 720px) { .admin-application-form-row-nested { padding-left: 12px; } }
/* Item 351 UAT run 4: "Set by step" sits on its own line under the label. */
.admin-application-form-set-by-step { display: block; margin-top: 4px; }
/* Item 351 UAT run 4 (NEW-9): values kept from an earlier application while the step is OFF. */
.admin-detail-list dd.admin-detail-earlier-value { color: #647985; font-weight: 500; }
.admin-detail-earlier-note { display: block; margin-top: 2px; color: #647985; font-style: italic; font-size: 10px; }
/* Item 351 UAT D2: Client 360 application without a loan. */
.admin-client360-no-loan { color: #647985; font-style: italic; white-space: nowrap; }
