: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, 2vw, 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) {
  .admin-template-policy { align-items: flex-start; flex-direction: column; }
  .admin-template-rule-card dl { grid-template-columns: 1fr; }
  .admin-template-dialog-body .admin-template-preview > div { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .admin-template-dialog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-template-dialog-actions .admin-button { width: 100%; min-height: 44px; }
  .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){.admin-sms-history-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.admin-sms-history-card{padding:13px}.admin-sms-history-facts{grid-template-columns:1fr}.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-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(100vw - 2rem));
  max-height: min(38rem, calc(100vh - 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) {
  .admin-operational-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-notification-panel { position: fixed; top: 4.8rem; right: 1rem; }
}

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

.admin-body {
  min-width: 320px;
  min-height: 100vh;
  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: 100vh; }

.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: 100vh;
  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: 100vh;
  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: 100vh;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 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, 4vw, 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-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: 100vh;
  padding: clamp(60px, 8vw, 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, 5vw, 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: 100vh; }
.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: 100vh; margin-left: 252px; }
.admin-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 82px;
  padding: 16px clamp(24px, 4vw, 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, 4vw, 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; }
.admin-setting-switch {
  position: relative;
  width: 47px;
  height: 27px;
  padding: 0;
  border: 1px solid #acbbc4;
  border-radius: 99px;
  background: #dce4e8;
  transition: background .15s, border-color .15s;
}

.admin-setting-switch > span:first-child {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgba(3, 23, 42, .25);
  transition: transform .15s;
}

.admin-setting-switch-on { border-color: var(--admin-teal); background: var(--admin-teal); }
.admin-setting-switch-on > span:first-child { transform: translateX(20px); }
.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, 3vw, 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-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, 28vw); }
.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; }
/* 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; 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: 22%; }
.admin-application-table th.admin-col-package,      .admin-application-table td.admin-col-package      { width: 7%; }
.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: 17%; }
.admin-application-table th.admin-col-employer,     .admin-application-table td.admin-col-employer     { width: 16%; }
.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. */
.admin-application-table th.admin-col-all-customer,     .admin-application-table td.admin-col-all-customer     { width: 15%; }
.admin-application-table th.admin-col-all-package,      .admin-application-table td.admin-col-all-package      { width: 7%; }
.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: 11%; }
.admin-application-table th.admin-col-all-history,      .admin-application-table td.admin-col-all-history      { width: 13%; }
.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: 11%; }
.admin-application-table th.admin-col-all-submitted,    .admin-application-table td.admin-col-all-submitted    { width: 8%; }
.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;
}
/* 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: verified pill + two glyph-prefixed numbers on ONE line */
.admin-application-table .admin-duitnow-checks-cell { display: inline-flex; flex-wrap: nowrap; gap: 6px; align-items: center; }
.admin-application-table .admin-duitnow-checks-cell .admin-link-button { display: inline-flex; align-items: center; }
.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;
}

/* Status (item 8): badge group ellipsizes, waiting time NEVER clips */
.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; }
#performanceReportTableRegion .admin-table th,
#performanceReportTableRegion .admin-table td {
  padding: 11px 6px;
  font-size: 9px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
#performanceReportTableRegion .admin-table th { white-space: normal; }
#performanceReportTableRegion .admin-table th:first-child,
#performanceReportTableRegion .admin-table td:first-child { width: 82px; }
#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) {
  .package-report-filter-row,.package-report-state-filter { align-items:stretch; }
  .package-report-filter-row .admin-filter-field { flex:1 1 45%; }
  .package-report-table { min-width:0; }
  .package-report-table thead { display:none; }
  .package-report-table tbody,.package-report-table tfoot,.package-report-table tr,.package-report-table td,.package-report-table th { display:block; width:100%; }
  .package-report-table tr { border:1px solid var(--admin-border, #dbe3ee); border-radius:12px; margin:0 0 12px; padding:12px; }
  .package-report-table td,.package-report-table th { display:flex; justify-content:space-between; gap:16px; border:0; padding:7px 0; text-align:right; }
  .package-report-table td::before,.package-report-table th[data-label]::before { content:attr(data-label); font-weight:700; text-align:left; }
  .package-report-table .package-sticky { position:static; box-shadow:none; background:transparent; }
  .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; }
/* 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. */
#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: 16%; }   /* Loan / client */
#badDebtTableRegion .admin-table th:nth-child(2),
#badDebtTableRegion .admin-table td:nth-child(2) { width: 8%; }    /* Repayment */
#badDebtTableRegion .admin-table th:nth-child(3),
#badDebtTableRegion .admin-table td:nth-child(3) { width: 7%; }    /* Released */
#badDebtTableRegion .admin-table th:nth-child(4),
#badDebtTableRegion .admin-table td:nth-child(4) { width: 7%; }    /* Received */
#badDebtTableRegion .admin-table th:nth-child(5),
#badDebtTableRegion .admin-table td:nth-child(5) { width: 6%; }    /* Net chg */
#badDebtTableRegion .admin-table th:nth-child(6),
#badDebtTableRegion .admin-table td:nth-child(6) { width: 8%; }    /* Additional charges */
#badDebtTableRegion .admin-table th:nth-child(7),
#badDebtTableRegion .admin-table td:nth-child(7) { width: 7%; }    /* Outstanding */
#badDebtTableRegion .admin-table th:nth-child(8),
#badDebtTableRegion .admin-table td:nth-child(8) { width: 8%; }   /* Due date / aging */
#badDebtTableRegion .admin-table th:nth-child(9),
#badDebtTableRegion .admin-table td:nth-child(9) { width: 7%; }    /* Extended */
#badDebtTableRegion .admin-table th:nth-child(10),
#badDebtTableRegion .admin-table td:nth-child(10) { width: 10%; }  /* Status */
#badDebtTableRegion .admin-table th:nth-child(11),
#badDebtTableRegion .admin-table td:nth-child(11) { width: 16%; }  /* 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(6) {
  text-transform: none;
  white-space: normal;
  line-height: 1.15;
  word-break: normal;
  overflow-wrap: normal;
}
#badDebtTableRegion .admin-table th:nth-child(9) {
  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(11),
#badDebtTableRegion .admin-table td:nth-child(11) { overflow: hidden; min-width: 0; }
#badDebtTableRegion .admin-table td:nth-child(11) .admin-table-actions {
  min-width: 0; flex-wrap: nowrap; gap: 4px; justify-content: flex-end; white-space: nowrap;
}
#badDebtTableRegion .admin-table td:nth-child(11) .admin-table-actions > * {
  flex: 0 0 auto; white-space: nowrap;
}
#badDebtTableRegion .admin-table td:nth-child(11) .admin-button,
#badDebtTableRegion .admin-table td:nth-child(11) .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(10) .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. 10 columns: Date, Loan/client, Type,
   Received, Charges, Method, Bank, Reference, Recorded by, Actions. The table
   was auto-layout so the loan/client name clipped on one line while the wide
   nowrap Bank/Reference cells hogged width. 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. */
#repaymentTableRegion .admin-table { table-layout: fixed; }
#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: 9%; }   /* Date */
#repaymentTableRegion .admin-table th:nth-child(2),
#repaymentTableRegion .admin-table td:nth-child(2) { width: 16%; }  /* Loan / client */
#repaymentTableRegion .admin-table th:nth-child(3),
#repaymentTableRegion .admin-table td:nth-child(3) { width: 7%; }   /* Type */
#repaymentTableRegion .admin-table th:nth-child(4),
#repaymentTableRegion .admin-table td:nth-child(4) { width: 7%; }   /* Received */
#repaymentTableRegion .admin-table th:nth-child(5),
#repaymentTableRegion .admin-table td:nth-child(5) { width: 6%; }   /* Charges */
#repaymentTableRegion .admin-table th:nth-child(6),
#repaymentTableRegion .admin-table td:nth-child(6) { width: 7%; }   /* Method */
#repaymentTableRegion .admin-table th:nth-child(7),
#repaymentTableRegion .admin-table td:nth-child(7) { width: 6%; }   /* Bank */
#repaymentTableRegion .admin-table th:nth-child(8),
#repaymentTableRegion .admin-table td:nth-child(8) { width: 9%; }   /* Reference (fixed-length) */
#repaymentTableRegion .admin-table th:nth-child(9),
#repaymentTableRegion .admin-table td:nth-child(9) { width: 7%; }   /* Recorded by */
#repaymentTableRegion .admin-table th:nth-child(10),
#repaymentTableRegion .admin-table td:nth-child(10) { width: 26%; } /* Actions (Receipt + View details + More) */
/* Item 227 fix: the Actions column holds up to THREE controls (Receipt +
   View details + More actions). Keep them on ONE line INSIDE the cell -- do NOT
   use overflow:visible (that let the green Receipt button spill left over the
   Recorded-by column). The column is wide enough (26%) and the buttons are
   compact, so they fit without overflow; neutralise the sticky 148px min-width. */
#repaymentTableRegion .admin-table th:nth-child(10),
#repaymentTableRegion .admin-table td:nth-child(10) { overflow: hidden; min-width: 0; }
#repaymentTableRegion .admin-table td:nth-child(10) .admin-table-actions {
  min-width: 0; flex-wrap: nowrap; gap: 4px; justify-content: flex-end; white-space: nowrap;
}
#repaymentTableRegion .admin-table td:nth-child(10) .admin-table-actions > * {
  flex: 0 0 auto; white-space: nowrap;
}
#repaymentTableRegion .admin-table td:nth-child(10) .admin-button,
#repaymentTableRegion .admin-table td:nth-child(10) .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. */
#repaymentTableRegion .admin-table td:nth-child(8) { 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-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: repeat(2,minmax(0,1fr)); gap: 14px; min-width: 0; overflow: hidden; }
.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-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) {
  .admin-client360-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .admin-client360-intro { flex: 1 1 100%; }
  .admin-client360-main-grid, .admin-client360-card-grid { grid-template-columns: 1fr; }
  .admin-client360-main-grid > .admin-client360-section:first-child, .admin-client360-main-grid > .admin-client360-section:last-child { grid-column: auto; }
  .admin-client360-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-financial-summary-body { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-client360-evidence-grid { grid-template-columns: 1fr; }
  .admin-client360-evidence-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-client360-package-head { display: none; }
  .admin-client360-package-row { grid-template-columns: 1fr; gap: 8px; }
  .admin-client360-package-row [data-label]::before { display: block; margin-bottom: 3px; color: #647985; content: attr(data-label); font-size: .75rem; font-weight: 700; }
  .admin-client360-package-row .admin-client360-reset { grid-column: 1; }
  .admin-client360-activity li { grid-template-columns: 1fr; gap: 4px; }
  .admin-client360 { padding-inline: 20px; }
  .admin-client360-actions { align-items: flex-start; flex-wrap: wrap; }
  .admin-client360-main-grid > .admin-client360-section:first-child, .admin-client360-main-grid > .admin-client360-wallet-section, .admin-client360-main-grid > .admin-client360-section:last-child { grid-column: auto; grid-row: auto; }
  .admin-client360-package-controls { align-items: stretch; flex-direction: column; }
}
@media (max-width: 767px) {
  .admin-client360 { gap: 16px; padding: 0 16px 16px; }
  .admin-client360-actions .admin-client360-intro { flex-basis: 100%; }
  .admin-client360-actions .admin-button { flex: 1 1 100%; }
  .admin-client360-kpis, .admin-financial-summary-body { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-client360-evidence-actions, .admin-client360-wallet-provider-grid { grid-template-columns: 1fr; }
  .admin-client360-section { padding: 16px; }
  .admin-client360-wallet-provider { min-height: 112px; padding: 14px; }
  .admin-client360-wallet-logo { flex-basis: 36px; width: 36px; height: 36px; }
  .admin-client360-section .admin-table-region { display: none; }
  .admin-client360-application-cards { display: grid; gap: 12px; }
  .admin-client360-application-card { display: grid; gap: 12px; min-width: 0; padding: 14px; border: 1px solid #dce7e7; border-radius: 12px; }
  .admin-client360-application-card h4 { margin: 0; }
  .admin-client360-application-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; }
  .admin-client360-application-facts dt { color: #647985; font-size: 12px; }
  .admin-client360-application-facts dd { margin: 3px 0 0; overflow-wrap: anywhere; }
  .admin-client360-application-card .admin-button { width: 100%; min-height: 44px; }
  .admin-client360-section .admin-table tr { min-width: 0; }
  .admin-client360-section .admin-table td { min-width: 0; max-width: 100%; }
  .admin-client360-evidence-action, .admin-client360-package-row select, .admin-client360-reset { width: 100%; min-height: 44px; }
}
@media (max-width: 359px) {
  .admin-client360-kpis, .admin-financial-summary-body { grid-template-columns: 1fr; }
}
.admin-detail-loading { min-height: 60vh; }
.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; }
.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: 100vw; max-width: none; height: 100dvh; 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, 3vw, 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, 2.5vw, 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, 2vw, 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, 3vw, 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) {
  .admin-media-viewer-actions { align-items: stretch; flex-direction: column; }
  .admin-media-viewer-actions p { width: 100%; margin: 0 0 3px; }
  .admin-media-viewer-actions .admin-button { width: 100%; }
  .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}.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:80vh;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:40vh;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(100dvh - 24px); overflow: hidden; }
#recordRepaymentForm { max-height: calc(100dvh - 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) {
  .admin-list-header:has(#filterForm) { align-items: flex-start; flex-direction: column; }
  #filterForm { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

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

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

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

@media (max-width: 430px) {
  .admin-auth-brand .admin-brand-tag { display: none; }
  .admin-auth-brand { right: 22px; left: 22px; justify-content: space-between; }
  .admin-auth-brand .admin-language-select { min-width: 112px; max-width: 118px; }
  .admin-summary-grid { grid-template-columns: 1fr; }
  .admin-summary-card { min-height: 76px; }
  .admin-detail-list { grid-template-columns: 1fr; }
  .admin-detail-list .admin-detail-full { grid-column: auto; }
  .admin-drawer-title-row h2 { font-size: 20px; }
  .admin-client-portal-button { width: 44px; min-width: 44px; height: 44px; padding: 0; justify-content: center; }
  .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; }
  .admin-drawer-meta { align-items: flex-start; flex-direction: column; }
  .admin-identity-review-title,
  .admin-verification-attempt-header { align-items: flex-start; flex-direction: column; }
  .admin-verification-badges { justify-content: flex-start; }
  .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) {
  .admin-payment-alert-filters { display: grid; grid-template-columns: 1fr; padding: 0 14px 16px; }
  #badDebtActionDialog { max-height: calc(100dvh - 20px); overflow: hidden; }
  #badDebtActionForm { max-height: calc(100dvh - 20px); padding: 18px; overflow-y: auto; overscroll-behavior: contain; }
  #badDebtActionDialog .admin-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  #badDebtActionDialog .admin-dialog-actions .admin-button { width: 100%; min-height: 44px; height: auto; padding: 9px 12px; }
}
@media (max-width: 430px) {
  .package-report-summary .admin-summary-card { min-width: 0; }
  .package-report-summary .admin-summary-card strong { font-size: clamp(18px, 5.5vw, 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,2vw,2rem);color:#0b2944}.admin-approval-stage-heading p{margin:0;color:#627987}
.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){.admin-approval-review-shell{display:block}.admin-approval-review-steps{display:none}.admin-approval-mobile-step{display:block}.admin-approval-stage .admin-detail-grid,.admin-approval-decision-grid{grid-template-columns:1fr}.admin-risk-summary{grid-template-columns:auto 1fr}.admin-risk-level{grid-column:1/-1;justify-self:start}}
@media(max-width:720px){.admin-pagination{justify-content:center;flex-wrap:wrap}.admin-direct-pager{order:3;width:100%;justify-content:center}.admin-direct-pager .admin-button,.admin-direct-pager input{min-width:44px;min-height:44px}.admin-direct-pager .admin-direct-page:not([aria-current="page"]):not(.admin-direct-page-edge){display:none}.admin-direct-page-go{margin-left:0}}
@media(max-width:600px){.admin-risk-summary{grid-template-columns:1fr}.admin-risk-score{width:76px;height:76px}.admin-approval-stage-actions{display:grid;grid-template-columns:1fr}.admin-approval-stage-actions .admin-button{width:100%}.admin-fraud-rule-summary{grid-template-columns:1fr}}
.admin-pending-alert{margin:1rem clamp(1rem,3vw,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){.admin-pending-alert{align-items:stretch;flex-direction:column}.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){.admin-release-recipient-grid{grid-template-columns:1fr}.admin-release-account{grid-column:auto}.admin-release-account dd{align-items:flex-start;flex-direction:column}.admin-release-account .admin-button{width:100%}}
.admin-comparison-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
.admin-comparison-list { display: grid; gap: 12px; margin: 20px 0; max-height: 60vh; 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){
  .admin-fixed-search{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}.admin-fixed-search input{width:100%;min-width:0}.admin-safety-order-note{display:block;width:100%;line-height:1.4}
  .admin-client-table,.admin-linked-history table{display:block;min-width:0;width:100%}.admin-client-table thead,.admin-linked-history thead{display:none}
  .admin-client-table tbody,.admin-linked-history tbody{display:grid;gap:12px}.admin-client-table tr,.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)}
  .admin-client-table td,.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}
  .admin-client-table td::before,.admin-linked-history td::before{content:attr(data-label);color:#607784;font-size:.78rem;font-weight:750}
  .admin-client-table td:last-child,.admin-linked-history td:last-child{border-bottom:0!important}.admin-client-table .admin-table-actions,.admin-linked-history .admin-view-button{width:100%}
  .admin-filters select,.admin-filters input,.admin-filters button{min-height:44px}.admin-repeat-compare{width:100%}
  .admin-list-toolbar{display:grid!important;grid-template-columns:1fr!important}.admin-list-toolbar>*{width:100%;min-width:0}.admin-list-sort-field{display:flex}.admin-filter-chips{display:flex!important}.admin-filter-chips.admin-hidden{display:none!important}.admin-filter-chip{width:auto;min-height:44px}
  .admin-inline-comparison-heading{display:grid;padding:15px}.admin-inline-comparison-count{justify-self:start}.admin-inline-comparison-reason{grid-template-columns:1fr;padding:12px 15px}.admin-inline-comparison-table-wrap{overflow:visible}.admin-inline-comparison-table,.admin-inline-comparison-table tbody,.admin-inline-comparison-table tr{display:block;width:100%}.admin-inline-comparison-table thead{display:none}.admin-inline-comparison-table tr{border-top:1px solid #dce7ea}.admin-inline-comparison-table tbody th{display:block;width:100%;padding:12px 15px;border:0}.admin-inline-comparison-table td{display:block;width:100%;padding:12px 15px;border:0}.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)}.admin-inline-comparison-error{align-items:stretch;flex-direction:column}.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(100vw - 32px)); height: min(820px, calc(100dvh - 40px)); max-height: calc(100dvh - 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) {
  #activateLoanDialog .admin-dialog-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 10px 0 0; }
  #activateLoanDialog .admin-dialog-actions .admin-button { min-width: 0; padding-inline: 8px; font-size: .82rem; white-space: normal; }
  #suspendClientDialog .admin-dialog-actions, #suspendClientConfirmDialog .admin-dialog-actions, #unsuspendClientDialog .admin-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
  #suspendClientDialog form, #suspendClientConfirmDialog form, #unsuspendClientDialog form { max-height: calc(100dvh - 40px); overflow-y: auto; }
  #disapproveDialog .admin-disapproval-dialog-body { padding: 18px 16px 8px; }
  #disapproveDialog .admin-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  #disapproveDialog .admin-dialog-actions .admin-button { width: 100%; min-height: 48px; padding-block: 10px; flex: 0 0 auto; }
  #disapproveDialog .admin-checkbox-list>label { grid-template-columns:44px minmax(0,1fr); }
  .admin-wallet-assessment{grid-template-columns:1fr}.admin-wallet-provider-row{grid-template-columns:42px minmax(0,1fr)}.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}
.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(100vw - 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,4vw,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){.admin-voucher-policy-grid,.admin-voucher-report-totals{grid-template-columns:1fr}.admin-voucher-policy-card .admin-button{width:100%}.admin-voucher-table,.admin-voucher-report-table{min-width:720px}.admin-voucher-secret{letter-spacing:.03em}}
@media(max-width:640px){.admin-export-button{width:100%}.admin-export-dialog{width:calc(100vw - 20px);max-width:none;margin:auto}.admin-export-dialog .admin-dialog-actions{display:grid;grid-template-columns:1fr}.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){.admin-client-date-filter{grid-template-columns:1fr;width:100%}.admin-date-presets{grid-column:1}.admin-date-presets button{min-height:44px}}
@media(max-width:640px){
  #recordRepaymentDialog{max-height:calc(100dvh - 20px)}
  #recordRepaymentForm{padding-bottom:calc(16px + env(safe-area-inset-bottom));scroll-padding-bottom:24px}
  #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}
  #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){.admin-client-report-view .admin-filters{grid-template-columns:minmax(220px,2fr) minmax(180px,1fr)}.admin-client-report-view .admin-client-date-filter{grid-column:1/-1}.admin-client-report-view .admin-filter-button{justify-self:start}}
@media(max-width:760px){.admin-select-field:has(#clientSort){display:grid}.admin-select-field:has(#clientSort) select{min-height:44px}.admin-client-report-view .admin-filters{grid-template-columns:1fr}.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:auto;width:100%}.admin-client-report-view .admin-client-filter-actions{display:grid;grid-template-columns:1fr}.admin-client-report-view .admin-filter-button,.admin-client-report-view .admin-list-reset{width:100%}.admin-client-report-view .admin-client-table{min-width:0}.admin-client-report-view .admin-client-table td:first-child,.admin-client-report-view .admin-client-table td:last-child{min-width:0}.admin-client-report-view .admin-client-table .admin-table-actions{min-width:0;flex-wrap:wrap}.admin-client-report-view .admin-client-table .admin-table-actions>.admin-button{min-width:0}}
@media(max-width:760px){
  .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}
  .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}
  .admin-client-report-view .admin-client-table td.admin-table-action-cell>.admin-table-actions>.admin-button,
  .admin-client-report-view .admin-client-table td.admin-table-action-cell .admin-action-menu,
  .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){.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; }
.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}
.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) {
  .admin-review-contact-summary { grid-template-columns: 1fr; }
  .admin-approval-stage[data-approval-review-view="evidence"] .admin-media-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
  .admin-approval-stage[data-approval-review-view="evidence"] .admin-media-grid { grid-template-columns: 1fr; }
}
@media(max-width:700px){.admin-review-identity-strip{align-items:flex-start;flex-wrap:wrap}.admin-review-identity-copy{flex:1}.admin-review-identity-context{flex-basis:100%;order:3}.admin-review-summary-card{grid-template-columns:1fr}.admin-review-summary-primary{padding:0 0 12px;border-right:0;border-bottom:1px solid #dce7ea}.admin-review-summary-facts{grid-template-columns:1fr}.admin-review-wallet-pairs{grid-template-columns:1fr 1fr}.admin-review-applications{padding:12px;overflow-x:auto}.admin-review-applications table{min-width:920px}.admin-review-media>.admin-media-grid{grid-template-columns:1fr}.admin-overdue-range{flex-wrap:wrap;width:100%}}
@media(max-width:700px){#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-review-wallet-pair:has(.admin-wallet-mismatch-detail){grid-column:1/-1}.admin-wallet-mismatch-detail{display:grid;gap:8px;width:100%;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-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) {
  .admin-review-wallet-pairs,.admin-review-wallet-pair{grid-template-columns:1fr}.admin-review-wallet-pair>.admin-wallet-status{justify-self:start}.admin-wallet-control-row{grid-template-columns:32px minmax(0,1fr)}.admin-wallet-outcomes{display:grid;grid-template-columns:1fr}.admin-wallet-outcomes label{min-height:44px}.admin-wallet-recheck-controls{grid-template-columns:1fr}.admin-button.admin-wallet-recheck{min-height:44px}.admin-wallet-mismatch-comparison>div,.admin-wallet-mismatch-meta{grid-template-columns:1fr}
  .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(100vh - 250px));border:0;background:#f3f7f6}
@media(max-width:700px){.admin-package-workspace{margin-inline:-4px}.admin-package-workspace iframe{height:max(680px,calc(100vh - 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){.admin-package-access-row{align-items:stretch;flex-direction:column}.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){
  #bankAccountForm,#bankTransactionFilterForm,#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(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 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(100dvh - 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}
#bankAccountRows .admin-table-action-cell>.admin-table-actions{display:grid;grid-template-columns:repeat(2,minmax(120px,1fr));width:100%;gap:8px}
#bankAccountRows .admin-table-action-cell>.admin-table-actions>.admin-button{width:100%;min-width:0;min-height:44px;white-space:normal;overflow-wrap:anywhere}
@media(max-width:700px){
  .admin-dialog.admin-finance-dialog{width:calc(100vw - 20px);max-width:calc(100vw - 20px);height:auto;max-height:calc(100dvh - 20px);margin:auto;border-radius:14px}
  .admin-dialog.admin-finance-dialog>.admin-dialog-card{min-height:0;max-height:calc(100dvh - 20px);padding:18px 16px}
  #bankAccountRows .admin-table-action-cell{display:block!important;width:100%!important;padding-top:10px!important}
  #bankAccountRows .admin-table-action-cell>.admin-table-actions{grid-template-columns:1fr}
}

/* 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%}
}
@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}
}

/* 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) {
  #clientFilterForm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "search search"
      "status classification"
      "dates dates"
      "actions actions"
      "chips chips";
  }
  #clientFilterForm .admin-search-field,
  #clientFilterForm .admin-client-date-filter,
  #clientFilterForm .admin-client-filter-actions,
  #clientFilterForm .admin-filter-chips { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  #clientFilterForm {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "search"
      "status"
      "dates"
      "classification"
      "sort"
      "actions"
      "chips";
  }
  #clientFilterForm > *,
  #clientFilterForm .admin-search-field,
  #clientFilterForm .admin-client-date-filter,
  #clientFilterForm .admin-client-filter-actions,
  #clientFilterForm .admin-filter-chips { grid-column: 1; width: 100%; }
  #clientFilterForm .admin-client-date-filter { grid-template-columns: minmax(0, 1fr); }
  #clientFilterForm .admin-date-presets { grid-column: 1; }
  #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. */
  #packageReportSection .package-report-summary {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .package-report-summary .admin-summary-card { min-width: 0; }
  .package-report-summary .admin-summary-card strong {
    font-size: clamp(18px, 5.5vw, 22px);
    letter-spacing: -.025em;
  }
  #packageReportSection,
  #packageReportSection > *,
  .package-report-summary,
  .package-report-table-region {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .package-report-summary > .admin-summary-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }
  .package-report-table-region {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
  }
  .package-report-table,
  .package-report-table tbody,
  .package-report-table tfoot,
  .package-report-table tr {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .package-report-table tr {
    display: block;
  }
  .package-report-table td,
  .package-report-table th {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }
  .package-report-table td:has(.package-financial-detail) {
    display: block;
    text-align: left;
  }
  .package-report-table td:has(.package-financial-detail)::before {
    display: block;
    margin-bottom: 6px;
  }
  .package-report-table details,
  .package-financial-detail {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .package-financial-detail div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
  }
  .package-financial-detail dt {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .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-review-wallet-pair:has(.admin-wallet-mismatch-detail){grid-column:1/-1}
.admin-wallet-mismatch-detail{grid-template-columns:minmax(0,1fr)}
.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(100dvh - 32px)}
#recordRepaymentForm{display:flex;max-height:calc(100dvh - 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}

.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){.admin-review-wallet-pairs{grid-template-columns:1fr}}
@media(max-width:980px){
  .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}
  .admin-wallet-outcomes{min-width:0;max-width:100%;box-sizing:border-box}
  .admin-wallet-outcomes label span{min-width:0;overflow-wrap:anywhere}
  .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: 70vh;
  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) {
  .released-date-filter__presets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .released-date-filter__presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .released-date-filter__custom { grid-template-columns: minmax(0, 1fr); }
}
