/* Loan Records presentation is isolated from other application pages. */
body.records-workspace {
    --records-ink: #182c43;
    --records-muted: #52657a;
    --records-border: #dce4ec;
    --records-accent: #116b65;
    --records-surface: #fff;
    --records-subtle: #f5f8fa;
    --records-focus: #117f73;
    --records-hover-border: #a5c5bc;
    --records-hover-surface: #edf5f2;
    --records-expanded-border: #9dbfb6;
    --records-expanded-surface: #f3f9f6;
    background: #f2f5f8 !important;
    color: var(--records-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body.records-workspace *, body.records-workspace *::before, body.records-workspace *::after { box-sizing: border-box; }
body.records-workspace .main-content { display: block !important; min-width: 0; margin: 0 !important; padding: 0 26px 26px !important; background: transparent; }
body.records-workspace .main-content main { width: 100%; max-width: none; min-width: 0; margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
body.records-workspace .page-header { display: flex; align-items: center !important; flex-direction: row !important; justify-content: space-between; gap: 20px; margin: 0 !important; padding: 22px 0 18px; min-height: 0; background: transparent !important; border: 0 !important; box-shadow: none; }
body.records-workspace .page-header::before, body.records-workspace .page-header::after, body.records-workspace .header-content::before, body.records-workspace .header-content::after { display: none; }
body.records-workspace .page-header .header-content { display: block !important; flex: 1; width: auto !important; max-width: none; margin: 0 !important; padding: 0 !important; text-align: left !important; }
body.records-workspace .records-eyebrow { margin: 0 0 5px; color: var(--records-accent); font-size: 10px !important; font-weight: 750; letter-spacing: .15em; }
body.records-workspace .page-header h1 { display: block; margin: 0; padding: 0; color: var(--records-ink) !important; font-size: 28px !important; line-height: 1.2; font-weight: 720; letter-spacing: -.04em; text-shadow: none; }
body.records-workspace .records-intro { margin: 6px 0 0; color: var(--records-muted); font-size: 12px !important; line-height: 1.5; }
body.records-workspace .records-overview { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; padding-left: 22px; border-left: 1px solid var(--records-border); flex-shrink: 0; }
body.records-workspace .records-overview-label { color: var(--records-muted); font-size: 10px !important; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
body.records-workspace #recordsCount { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; color: var(--records-ink); font-size: 17px !important; font-weight: 650; font-variant-numeric: tabular-nums; }
body.records-workspace .records-toolbar { padding: 13px 16px; margin: 0 0 17px; border: 1px solid var(--records-border); border-radius: 10px; background: var(--records-surface); box-shadow: 0 2px 8px #172b4003; }
body.records-workspace .search-section, body.records-workspace .filter-bar { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent !important; box-shadow: none; }
body.records-workspace .search-container { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; max-width: none; border: 0 !important; background: transparent !important; box-shadow: none !important; }
body.records-workspace .search-input-container { flex: 1; min-width: 0; margin: 0; }
body.records-workspace #searchInput { display: block; width: 100%; max-width: none; height: 37px !important; min-height: 37px; margin: 0; padding: 8px 12px !important; border: 1px solid #cbd6e1 !important; border-radius: 7px; background: var(--records-surface); color: var(--records-ink); font: inherit; font-size: 13px; box-shadow: none; }
body.records-workspace #searchInput::placeholder { color: var(--records-muted); opacity: 1; }
body.records-workspace .search-buttons { display: flex; flex: 0 0 auto; gap: 7px; margin: 0; }
body.records-workspace .filter-container { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 11px 0 0; padding: 11px 0 0; border-top: 1px solid var(--records-border); }
body.records-workspace .filter-group.inline { display: flex; flex-direction: column; align-items: stretch; gap: 5px; flex: 1 1 100px; min-width: 0; margin: 0; }
body.records-workspace .filter-group:has(#replenishFilter) { flex-basis: 170px; }
body.records-workspace .filter-group:has(#selectAllCheckbox) { flex: 0 0 auto; order: 2; align-self: flex-end; padding: 9px 0; }
body.records-workspace .filter-group label, body.records-workspace .admin-branch-filter label { margin: 0; color: var(--records-muted); font-size: 11px; font-weight: 600; line-height: 1.35; white-space: normal; }
body.records-workspace #branchFilterContainer .admin-branch-filter { display: flex; flex-direction: column; align-items: stretch; gap: 5px; margin: 0; }
body.records-workspace :is(.filter-select, #branchFilter, .records-per-page-select) { width: 100% !important; min-width: 0 !important; max-width: 100%; height: 34px !important; min-height: 34px !important; margin: 0; padding: 6px 25px 6px 9px !important; border: 1px solid #cbd6e1 !important; border-radius: 6px !important; color: var(--records-ink) !important; background-color: var(--records-surface) !important; font-size: 12px !important; font-weight: 500; box-shadow: none !important; }
body.records-workspace #customDateRangeContainer { flex: 1 0 100%; flex-direction: row; flex-wrap: wrap; align-items: center; }
body.records-workspace #customDateRangeContainer input { flex: 1; max-width: 180px; }
body.records-workspace #customDateRangeContainer button { flex: 0 0 auto; }
body.records-workspace input[type=checkbox] { width: 16px !important; height: 16px !important; min-width: 16px; min-height: 16px !important; margin: 0; padding: 0; appearance: auto; accent-color: var(--records-accent); border-radius: 3px; transform: none; flex-shrink: 0; }
body.records-workspace .branch-badge { display: inline-block; padding: 8px 10px; background: var(--records-subtle); color: var(--records-ink); font-size: 12px; border: 1px solid var(--records-border); border-radius: 6px; }
body.records-workspace #searchResults:empty { display: none; }
body.records-workspace .search-info { margin: 8px 0 0; padding: 6px 0; color: var(--records-accent); background: transparent; border: 0; font-size: 12px; }
body.records-workspace .records-container { padding: 0; margin: 0; background: transparent !important; border: 0; box-shadow: none; border-radius: 0; }
body.records-workspace .records-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 0 0 9px; padding: 0; border: 0; background: none; }
body.records-workspace .records-title { margin: 0; padding: 0; color: var(--records-ink); font-size: 14px !important; font-weight: 700; }
body.records-workspace .records-list-hint { font-size: 11px !important; color: var(--records-muted); }
body.records-workspace #recordsList { display: flex; flex-direction: column; gap: 9px; padding: 0; margin: 0; }
body.records-workspace .client-group { scroll-margin-top: 90px; width: 100%; min-width: 0; margin: 0 !important; border: 1px solid var(--records-border) !important; border-radius: 9px; background: var(--records-surface) !important; box-shadow: 0 2px 5px #172b4003 !important; overflow: visible; }
body.records-workspace .client-header { display: grid !important; grid-template-columns: minmax(230px, 1.35fr) minmax(330px, 2fr) auto; align-items: center; gap: 16px; margin: 0 !important; padding: 15px 16px !important; min-height: 95px !important; border: 0 !important; border-radius: 9px; color: var(--records-ink); background: var(--records-surface) !important; box-shadow: none !important; }
body.records-workspace .client-header::before { display: none !important; }
body.records-workspace .client-info { width: auto; min-width: 0; margin: 0; padding: 0; flex: initial; }
body.records-workspace .client-info h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 5px; justify-content: flex-start !important; text-align: left !important; margin: 0 0 7px !important; padding: 0; font-size: 13px !important; line-height: 1.5; font-weight: 700; }
body.records-workspace .records-client-name { flex: 1 0 100%; margin: 0; color: var(--records-ink) !important; font-size: 14px !important; font-weight: 700 !important; letter-spacing: -.015em; overflow-wrap: anywhere; }
/* Preserve the original branch identities with readable light-theme accents. */
html:not([data-theme=dark]) body.records-workspace .records-client-name-parang { color: #0056b3 !important; }
html:not([data-theme=dark]) body.records-workspace .records-client-name-cogeo { color: #c12c3d !important; }
html:not([data-theme=dark]) body.records-workspace .records-client-name-rainbow { color: #553c9a !important; }
html:not([data-theme=dark]) body.records-workspace .records-client-name-alo { color: #18763b !important; }
html:not([data-theme=dark]) body.records-workspace .records-client-name-marinduque { color: #8b4513 !important; }
body.records-workspace :is(.records-bank-badge, .records-doc-badge, .records-pension-type) { display: inline-flex !important; align-items: center; min-height: 18px; padding: 1px 6px !important; margin: 0 !important; border: 1px solid var(--records-border); border-radius: 4px !important; background: var(--records-subtle) !important; color: var(--records-muted) !important; font-size: 9px !important; line-height: 1.4; font-weight: 650 !important; letter-spacing: .02em !important; box-shadow: none !important; }
body.records-workspace .records-bank-badge { color: var(--records-accent) !important; border-color: #c6ded8; background: #eff7f4 !important; }
body.records-workspace .client-info .client-details { margin: 0; color: var(--records-muted) !important; font-size: 10px !important; line-height: 1.5; overflow-wrap: anywhere; }
body.records-workspace .client-details :is(span, strong) { color: var(--records-muted) !important; font-size: inherit !important; padding: 0 !important; background: transparent !important; font-weight: 600; box-shadow: none !important; }
body.records-workspace .client-summary { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; width: auto; margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
body.records-workspace .summary-stat { display: flex !important; flex-direction: column-reverse; align-items: flex-start; gap: 6px; min-width: 0; margin: 0; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; text-align: left; }
body.records-workspace .summary-stat .stat-label { display: block; margin: 0; color: var(--records-muted) !important; font-size: 10px !important; font-weight: 500; line-height: 1.4; text-transform: none; letter-spacing: 0; white-space: normal; }
body.records-workspace .summary-stat .stat-value { display: block; margin: 0; color: var(--records-ink) !important; font-size: 13px !important; font-weight: 650; line-height: 1.3; letter-spacing: -.025em; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.records-workspace .summary-stat:nth-child(5) .stat-value { color: var(--records-accent) !important; }
body.records-workspace .client-actions { display: flex !important; flex-direction: column; align-items: stretch; gap: 6px; margin: 0; padding: 0; width: 110px !important; min-width: 0 !important; }
body.records-workspace :is(button, .btn-client-profile, .btn-view, .btn-batch-details, a.btn-primary) { transition: none !important; transform: none !important; box-shadow: none !important; text-decoration: none; }
body.records-workspace :is(.btn-search, .btn-clear, .btn-primary, .btn-client-toggle, .btn-client-profile, .btn-view, .action-buttons-wrapper button, .btn-batch-details, .pagination-btn, .btn-bulk-replenish, .btn-clear-selection, .btn-save, .btn-cancel) { display: inline-flex; justify-content: center; align-items: center; gap: 4px; min-width: 0; min-height: 30px !important; width: auto; height: auto; margin: 0; padding: 6px 10px !important; border: 1px solid var(--records-border) !important; border-radius: 6px !important; background: var(--records-surface) !important; color: var(--records-ink) !important; font: inherit; font-size: 11px !important; font-weight: 600 !important; line-height: 1.4; white-space: normal; cursor: pointer; }
body.records-workspace :is(.btn-search, .btn-bulk-replenish, .btn-primary) { min-height: 37px !important; background: var(--records-accent) !important; border-color: var(--records-accent) !important; color: #fff !important; padding-inline: 18px !important; }
body.records-workspace .btn-clear { min-height: 37px !important; padding-inline: 15px !important; }
body.records-workspace .btn-client-toggle { background: #edf6f3 !important; border-color: #c9ded8 !important; color: var(--records-accent) !important; }
body.records-workspace .btn-client-toggle::after { content: ''; width: 6px; height: 6px; margin: -3px 2px 0 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
body.records-workspace .btn-client-toggle[aria-expanded=true]::after { transform: rotate(225deg); margin-top: 3px; }
body.records-workspace :is(button, a):focus-visible, body.records-workspace :is(input, select):focus-visible { outline: 3px solid #168b80 !important; outline-offset: 2px; }
body.records-workspace :is(button, a):hover:not(:disabled) { filter: brightness(.97); }
body.records-workspace button:disabled { cursor: not-allowed !important; opacity: .6; }
body.records-workspace .client-loans { margin: 0 !important; padding: 0 16px !important; border-top: 1px solid var(--records-border) !important; background: var(--records-subtle) !important; border-radius: 0 0 9px 9px; }
body.records-workspace .client-loan-item { position: relative; margin: 0 !important; padding: 14px 0 !important; background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--records-border) !important; border-radius: 0; box-shadow: none !important; overflow: visible; }
body.records-workspace .client-loan-item:last-child { border-bottom: 0 !important; }
body.records-workspace .loan-status-indicator { display: none; }
body.records-workspace .loan-header { display: grid !important; grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.3fr); gap: 15px; align-items: center; margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
body.records-workspace .loan-info { min-width: 0; margin: 0; padding: 0; }
body.records-workspace .loan-info h4 { margin: 0 0 6px !important; padding: 0; color: var(--records-ink) !important; font-size: 12px !important; line-height: 1.5; font-weight: 700; text-transform: none; }
body.records-workspace .loan-info .loan-details { color: var(--records-muted) !important; font-size: 11px !important; line-height: 1.8; overflow-wrap: anywhere; }
body.records-workspace :is(.replenishment-label, .former-branch-badge) { display: inline-block; margin: 5px 5px 0 0 !important; padding: 2px 6px !important; border: 1px solid #cadfd8; border-radius: 4px !important; background: #eaf5f0 !important; color: #18604c !important; font-size: 9px !important; line-height: 1.4; font-weight: 600 !important; }
body.records-workspace .replenishment-label.pending { background: #fff5e6 !important; color: #8b530d !important; border-color: #f0dbb4; }
body.records-workspace .former-branch-badge { background: #edf0f5 !important; color: #52657a !important; border-color: #d6dfe8; }
body.records-workspace .loan-actions { display: flex !important; flex-direction: column; gap: 8px; margin: 0; padding: 0; min-width: 0; width: 100%; }
body.records-workspace .loan-status-row { display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 !important; padding: 0; width: 100%; }
body.records-workspace .loan-status-row .btn-view { margin-left: auto; }
body.records-workspace .loan-status-badge { display: inline-block; margin: 0; padding: 3px 7px; border-radius: 4px; font-size: 9px !important; font-weight: 700; line-height: 1.4; letter-spacing: .04em; text-transform: uppercase; box-shadow: none; }
body.records-workspace .loan-status-badge.active { color: #18604c !important; background: #e4f2eb !important; }
body.records-workspace .loan-status-badge.overdue { color: #9b293b !important; background: #fbecef !important; }
body.records-workspace .loan-status-badge.completed { color: #3d5878 !important; background: #e9eff7 !important; }
body.records-workspace .loan-status-badge.cancelled { color: #6b5261 !important; background: #f0eaf0 !important; }
body.records-workspace .loan-status-badge.review { color: #7a4f06 !important; background: #fbf1dc !important; }
body.records-workspace .action-buttons-wrapper { display: flex !important; flex-wrap: wrap; justify-content: flex-end; gap: 6px; width: 100%; margin: 0; padding: 0; }
body.records-workspace .action-buttons-wrapper .btn-send-summary { color: var(--records-accent) !important; background: #edf6f3 !important; border-color: #c9ded8 !important; }
body.records-workspace .action-buttons-wrapper .btn-replenish-sent { color: #18604c !important; opacity: .75; }
body.records-workspace .pagination-container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0 0; padding: 10px 0; border: 0; border-top: 1px solid var(--records-border); background: transparent !important; box-shadow: none; border-radius: 0; }
body.records-workspace .top-pagination { margin: 0 0 9px; padding: 0 0 9px; border: 0; }
body.records-workspace .pagination-info { display: flex; flex-wrap: wrap; align-items: center; flex-direction: row !important; gap: 9px; margin: 0; color: var(--records-muted); font-size: 10px; }
body.records-workspace .records-per-page-select { width: auto !important; flex: 0 0 auto !important; height: 30px !important; min-height: 30px !important; font-size: 10px !important; }
body.records-workspace .pagination-buttons, body.records-workspace .page-numbers { display: flex; flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; }
body.records-workspace .pagination-btn { width: auto !important; flex: 0 0 auto !important; min-height: 28px !important; padding: 4px 8px !important; font-size: 10px !important; }
body.records-workspace .pagination-btn.active { color: #fff !important; background: var(--records-accent) !important; border-color: var(--records-accent) !important; }
body.records-workspace .bulk-action-bar { flex-wrap: wrap; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid #bdd8cf; border-radius: 8px; background: #eaf5f0; color: #18604c; box-shadow: none; }
body.records-workspace .bulk-info { font-size: 12px; }
body.records-workspace .bulk-actions { display: flex; flex-wrap: wrap; gap: 8px; }
body.records-workspace .no-records, body.records-workspace #recordsList > .error { padding: 40px 20px; text-align: center; border: 1px dashed var(--records-border); border-radius: 9px; background: var(--records-surface); color: var(--records-muted); }
body.records-workspace .no-records h3 { color: var(--records-ink); font-size: 16px; }
body.records-workspace .no-records p { font-size: 12px; }
body.records-workspace .records-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.records-workspace .modern-sidebar { border: 1px solid #e2e8ef; box-shadow: none; }
body.records-workspace .modern-sidebar .sidebar-link.active { background: #eaf4f1; color: #105f58; box-shadow: inset 3px 0 #14796e; }
body.records-workspace :is(.send-summary-modal, .bulk-replenish-modal) > div { width: min(560px, calc(100vw - 24px)) !important; max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid var(--records-border); border-radius: 12px; background: var(--records-surface); color: var(--records-ink); box-shadow: 0 20px 70px #10263830; }

@media (min-width: 901px) {
    body.records-workspace > .container { display: block; width: 100% !important; max-width: none !important; margin: 74px 0 0 !important; padding: 0 0 0 240px !important; }
    body.records-workspace .modern-sidebar { width: 210px !important; left: 14px !important; top: 88px !important; height: calc(100dvh - 100px) !important; }
    body.records-workspace .modern-sidebar :is(.sidebar-link, .dropdown-toggle) { font-size: 13px !important; padding: 10px 12px; }
    body.records-workspace .app-header > .header-content { grid-template-columns: minmax(250px, 1fr) auto !important; }
    body.records-workspace .app-header .header-breadcrumb { display: none; }
}
/* Screen only: clear the shared 280px sidebar; direct Ctrl+P keeps the original 240px layout above. */
@media screen and (min-width: 901px) {
    body.records-workspace > .container { padding-left: 316px !important; }
    body.records-workspace .filter-group.inline { min-width: 112px; }
}
@media (min-width: 901px) and (max-width: 1400px) {
    body.records-workspace .main-content { padding-inline: 18px !important; }
    body.records-workspace .page-header { padding-block: 15px; }
    body.records-workspace .client-header { grid-template-columns: minmax(200px, 1.1fr) minmax(330px, 2fr) auto; gap: 12px; padding: 12px 14px !important; }
    body.records-workspace .client-summary { gap: 8px; }
    body.records-workspace .summary-stat .stat-value { font-size: 12px !important; }
    body.records-workspace .loan-header { grid-template-columns: minmax(240px, 1fr) minmax(310px, 1.4fr); }
}
@media (min-width: 1800px) {
    body.records-workspace .main-content { max-width: 1720px; margin-inline: auto !important; padding-inline: 32px !important; }
    body.records-workspace .client-header { grid-template-columns: minmax(300px, 1.2fr) minmax(580px, 2.2fr) auto; min-height: 102px !important; gap: 25px; padding: 16px 20px !important; }
    body.records-workspace .summary-stat .stat-value { font-size: 15px !important; }
    body.records-workspace .summary-stat .stat-label { font-size: 11px !important; }
}
@media (max-width: 900px) {
    body.records-workspace > .container { display: block; width: 100% !important; max-width: none !important; margin: 70px 0 0 !important; padding: 0 !important; }
    body.records-workspace .main-content { padding: 0 14px 20px !important; }
    body.records-workspace .page-header { flex-wrap: wrap; gap: 12px; padding: 17px 0 14px; }
    body.records-workspace .page-header h1 { font-size: 25px !important; }
    body.records-workspace .records-overview { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 10px 0 0; border: 0; border-top: 1px solid var(--records-border); }
    body.records-workspace #recordsCount { font-size: 14px !important; }
    body.records-workspace .records-toolbar { padding: 12px; }
    body.records-workspace .search-container { flex-wrap: wrap; }
    body.records-workspace #searchInput { height: 44px !important; min-height: 44px; font-size: 16px; }
    body.records-workspace .search-input-container { flex-basis: 100%; }
    body.records-workspace .search-buttons { width: 100%; }
    body.records-workspace .search-buttons button { flex: 1; min-height: 40px !important; font-size: 12px !important; }
    body.records-workspace .filter-container { gap: 10px; }
    body.records-workspace .filter-group.inline { flex: 1 1 calc(50% - 10px); }
    body.records-workspace .filter-group:has(#selectAllCheckbox) { flex-basis: calc(50% - 10px); }
    body.records-workspace :is(.filter-select, #branchFilter) { height: 42px !important; min-height: 42px !important; font-size: 16px !important; }
    body.records-workspace #customDateRangeContainer { flex-basis: 100%; }
    body.records-workspace .records-header { margin-bottom: 10px; }
    body.records-workspace .records-list-hint { font-size: 10px; }
    body.records-workspace .client-header { grid-template-columns: minmax(0, 1fr); gap: 13px; padding: 14px !important; }
    body.records-workspace .client-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 9px; padding-top: 12px !important; border-top: 1px solid var(--records-border) !important; }
    body.records-workspace .summary-stat .stat-value { font-size: 13px !important; }
    body.records-workspace .summary-stat .stat-label { font-size: 10px !important; }
    body.records-workspace .client-actions { flex-direction: row; width: 100% !important; }
    body.records-workspace .client-actions > * { flex: 1; min-height: 38px; font-size: 12px !important; }
    body.records-workspace .client-loans { padding-inline: 14px !important; }
    body.records-workspace .loan-header { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    body.records-workspace .loan-status-row { gap: 10px; }
    body.records-workspace .action-buttons-wrapper { justify-content: flex-start; }
    body.records-workspace .action-buttons-wrapper > *, body.records-workspace .loan-status-row .btn-view { min-height: 36px; font-size: 11px !important; }
    body.records-workspace .pagination-container { justify-content: center; gap: 10px; }
    body.records-workspace .pagination-info { justify-content: center; width: 100%; }
    body.records-workspace .pagination-btn { min-height: 34px; padding-inline: 9px !important; }
    body.records-workspace :is(.send-summary-modal, .bulk-replenish-modal) > div { margin: 16px auto !important; padding: 18px !important; }
}
html[data-theme=dark] body.records-workspace { --records-ink: #e4edf5; --records-muted: #afc0d1; --records-border: #384d60; --records-accent: #8cdbc8; --records-surface: #1d2b39; --records-subtle: #18232f; --records-focus: #86d7c2; --records-hover-border: #5e837b; --records-hover-surface: #263c3d; --records-expanded-border: #47786c; --records-expanded-surface: #1b2f35; background: #14212d !important; }
html[data-theme=dark] body.records-workspace :is(.btn-search, .btn-bulk-replenish, .btn-primary, .pagination-btn.active) { background: #14796e !important; border-color: #278c81 !important; }
html[data-theme=dark] body.records-workspace :is(.btn-client-toggle, .action-buttons-wrapper .btn-send-summary, .records-bank-badge) { background: #183e38 !important; border-color: #3d796b !important; color: #b7e6da !important; }
html[data-theme=dark] body.records-workspace .modern-sidebar { border-color: var(--records-border); }
html[data-theme=dark] body.records-workspace .modern-sidebar .sidebar-link.active { background: #183e38; color: #b7e6da; }

body.records-workspace :is(.page-header, .client-group, .client-header, .client-loan-item) { animation: none !important; transition: none !important; }
body.records-workspace .btn-client-profile::before { display: none !important; }
body.records-workspace .pagination-btn.page-number.active { background: var(--records-accent) !important; color: #fff !important; border-color: var(--records-accent) !important; }

body.records-workspace :is(#topRecordsPerPageSelect, #recordsPerPageSelect) { width: 108px !important; min-width: 0 !important; height: 30px !important; min-height: 30px !important; padding: 4px 20px 4px 8px !important; font-size: 10px !important; }
body.records-workspace .pagination-info > span { font-size: 10px !important; }
body.records-workspace .records-header { min-height: 0 !important; padding: 0 !important; margin: 0 0 10px !important; }
@media (max-width: 900px) {
    body.records-workspace .pagination-info { flex-wrap: nowrap; justify-content: space-between; }
    body.records-workspace .records-header { justify-content: flex-start; text-align: left; }
    body.records-workspace .records-list-hint { width: 100%; }
    body.records-workspace .filter-container { margin-top: 10px !important; padding-top: 10px !important; }
    body.records-workspace .search-section { min-height: 0 !important; }
    body.records-workspace .client-info { text-align: left !important; }
}

body.records-workspace .page-number-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px !important; height: 30px !important; min-height: 30px !important; min-width: 30px !important; padding: 4px !important; font-size: 10px !important; font-weight: 600; border: 1px solid var(--records-border); border-radius: 6px; color: var(--records-ink); background: var(--records-surface); }
body.records-workspace .page-number-btn.active { background: var(--records-accent) !important; color: #fff !important; border-color: var(--records-accent) !important; }
body.records-workspace :is(#searchBtn, #clearSearchBtn) { min-height: 37px !important; }
body.records-workspace #customDateRangeContainer[style*="grid"] { display: flex !important; }
@media (max-width: 900px) {
    body.records-workspace :is(#searchBtn, #clearSearchBtn) { min-height: 40px !important; }
    body.records-workspace .records-header { align-items: flex-start !important; flex-direction: column !important; }
    body.records-workspace .records-title { width: 100%; text-align: left !important; }
    body.records-workspace .page-number-btn { width: 34px !important; height: 34px !important; min-height: 34px !important; }
}

body.records-workspace :is(.send-summary-modal, .bulk-replenish-modal) { padding: 16px 0; background: #10263870 !important; }
body.records-workspace :is(.send-summary-modal, .bulk-replenish-modal) > div { padding: 22px !important; background: var(--records-surface) !important; }
body.records-workspace :is(.send-summary-modal, .bulk-replenish-modal) h3 { margin-bottom: 12px !important; color: var(--records-ink) !important; font-size: 18px !important; letter-spacing: -.025em; }
body.records-workspace :is(.send-summary-modal, .bulk-replenish-modal) :is(p, small, label, li) { color: var(--records-muted) !important; font-size: 12px !important; line-height: 1.5 !important; }
body.records-workspace :is(.send-summary-modal, .bulk-replenish-modal) p { margin-bottom: 12px !important; }
body.records-workspace :is(.send-summary-modal, .bulk-replenish-modal) input { width: 100%; min-width: 0; height: 37px; min-height: 37px; padding: 7px 10px !important; border: 1px solid var(--records-border) !important; border-radius: 6px; background: var(--records-surface); color: var(--records-ink); font-size: 14px !important; }
body.records-workspace :is(.send-summary-modal, .bulk-replenish-modal) button { min-height: 37px; padding: 8px 12px !important; border: 1px solid var(--records-border) !important; border-radius: 6px; background: var(--records-surface) !important; color: var(--records-ink) !important; font-size: 12px !important; font-weight: 600; }
body.records-workspace :is(.send-summary-modal, .bulk-replenish-modal) button[data-replenishment-submit] { color: #fff !important; background: #116b65 !important; border-color: #116b65 !important; }
body.records-workspace :is(.send-summary-modal, .bulk-replenish-modal) .replenishment-modal-error { font-size: 12px; }
@media (min-width: 901px) and (max-width: 1150px) {
    body.records-workspace .client-header { grid-template-columns: minmax(0, 1fr) 110px; }
    body.records-workspace .client-info { grid-column: 1; grid-row: 1; }
    body.records-workspace .client-actions { grid-column: 2; grid-row: 1; }
    body.records-workspace .client-summary { grid-column: 1 / -1; grid-row: 2; padding-top: 10px !important; border-top: 1px solid var(--records-border) !important; }
}
@media (max-width: 900px) {
    body.records-workspace :is(.send-summary-modal, .bulk-replenish-modal) input { height: 44px; min-height: 44px; font-size: 16px !important; }
}
body.records-workspace :is(.btn-client-toggle, .btn-view) span { font-size: inherit !important; }
body.records-workspace .btn-client-toggle:focus-visible { outline: 3px solid #168b80 !important; outline-offset: 2px; }
body.records-workspace .loan-info .loan-details .replenishment-label { font-size: 10px !important; }
@media (max-width: 900px) {
    body.records-workspace .action-buttons-wrapper > :is(button, a) { flex: 1 1 calc(50% - 6px); width: auto !important; }
    body.records-workspace .loan-status-badge { font-size: 10px !important; }
}

/* Metric surfaces and interaction feedback stay integrated with Records cards. */
html[data-theme=dark][data-page=records] body.records-workspace .client-summary :is(.summary-stat, .summary-stat > span) { background: transparent !important; box-shadow: none !important; }
html[data-page=records] body.records-workspace .client-group:has(.btn-client-toggle[aria-expanded=true]) { border-color: var(--records-expanded-border) !important; box-shadow: inset 2px 0 0 var(--records-expanded-border) !important; }
html[data-page=records] body.records-workspace .client-group:has(.btn-client-toggle[aria-expanded=true]) > .client-header { background: var(--records-expanded-surface) !important; border-radius: 9px 9px 0 0; }
@media (hover: hover) {
    html[data-page=records] body.records-workspace .client-group:hover { border-color: var(--records-hover-border) !important; }
    body.records-workspace :is(.main-content, .send-summary-modal, .bulk-replenish-modal) :is(button, a):not(:disabled):hover { background: var(--records-hover-surface) !important; border-color: var(--records-hover-border) !important; filter: none; }
    body.records-workspace :is(.main-content, .send-summary-modal, .bulk-replenish-modal) :is(.btn-search, .btn-primary, .btn-bulk-replenish, .pagination-btn.active, .page-number-btn.active, button[data-replenishment-submit]):not(:disabled):hover { background: #156c62 !important; color: #fff !important; }
}
body.records-workspace :is(.main-content, .send-summary-modal, .bulk-replenish-modal) :is(button, a, input, select):focus-visible { outline: 3px solid var(--records-focus) !important; outline-offset: 2px; }
html[data-page=records] body.records-workspace .client-group:has(:focus-visible) { border-color: var(--records-focus) !important; box-shadow: 0 0 0 1px var(--records-focus) !important; }
body.records-workspace .loan-status-row .loan-status-badge.active { color: #18604c !important; background: #e4f2eb !important; }
html[data-theme=dark] body.records-workspace .loan-status-row .loan-status-badge.active { color: #b7e6d0 !important; background: #193e34 !important; }
html[data-theme=dark] body.records-workspace .loan-status-row .loan-status-badge.overdue { color: #f6b4bf !important; background: #442631 !important; }
html[data-theme=dark] body.records-workspace .loan-status-row .loan-status-badge.completed { color: #bdd2ec !important; background: #23374d !important; }
html[data-theme=dark] body.records-workspace .loan-status-row .loan-status-badge.cancelled { color: #d8c5d5 !important; background: #352d3a !important; }
html[data-theme=dark] body.records-workspace .loan-status-row .loan-status-badge.review { color: #f2d49b !important; background: #43351c !important; }
