/* A read-only floating record, isolated from the editing/upload dialogs. */
.loan-record,.monitor-record{cursor:pointer}
.loan-record:hover,.monitor-record:hover{background:#f3f7fd}
.loan-record .ph-thumb.round,.monitor-record .ph-thumb.round{width:58px;height:58px;font-size:18px}
.borrower-photo-button{display:inline-flex;flex:none;border:0;background:transparent;padding:0;border-radius:8px;cursor:pointer}
.borrower-photo-button:hover{box-shadow:0 0 0 3px #2563eb30}
.borrower-photo-button:focus-visible{outline:3px solid #2563eb;outline-offset:3px}
body.loan-monitor-open{overflow:hidden}
.loan-monitor{border:0;padding:0;border-radius:20px;width:min(900px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow-y:auto;overscroll-behavior:contain;margin:auto;color:var(--text,#172b45);background:#fff;box-shadow:0 24px 90px #071a3d50}
.loan-monitor::backdrop{background:#091a31b8;backdrop-filter:blur(3px)}
.lm-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:24px 26px;border-bottom:1px solid var(--line,#e1e7ef)}
.lm-header h2{font-size:20px;overflow-wrap:anywhere;margin:5px 0}
.lm-header p{font-size:13px;color:var(--muted)}
.lm-header .icon-button{flex:none}
.lm-label{font-size:11px;font-weight:800;letter-spacing:.09em;color:#60748e;display:block}
.lm-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:28px;padding:26px}
.lm-portrait{height:310px;min-width:0;padding:6px;border-radius:15px;border:1px solid var(--line,#e1e7ef);background:#eef3fa;overflow:hidden;margin-bottom:18px;display:flex;align-items:center;justify-content:center}
.lm-photo{display:block;width:100%;height:100%;max-width:100%;max-height:100%;min-width:0;min-height:0;object-fit:contain;object-position:center}
.lm-photo-fallback{text-align:center;padding:24px;color:#60748e;display:grid;gap:16px}
.lm-photo-fallback.hidden,.lm-photo.hidden{display:none}
.lm-photo-fallback strong{font-size:64px;letter-spacing:-.04em;color:#2c5792}
.lm-photo-fallback span{font-size:13px;line-height:1.6}
.lm-borrower h3{font-size:25px;overflow-wrap:anywhere;margin:6px 0}
.lm-borrower p{font-size:12px;line-height:1.6;margin-top:8px}
.lm-tool h3{font-size:24px;line-height:1.25;margin:6px 0;overflow-wrap:anywhere}
.lm-tool p{color:var(--muted);font-size:14px}
.lm-timing{background:#f3f7fd;border:1px solid #dbe7fa;border-radius:14px;padding:18px;margin:20px 0}
.lm-timing>span{display:block;font-size:12px;margin-top:14px;color:#60748e}
.lm-timing>strong{display:block;font-size:23px;margin-top:5px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.lm-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px 20px}
.lm-fields dt{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#60748e;margin-bottom:5px;font-weight:700}
.lm-fields dd{margin:0;font-size:14px;font-weight:600;overflow-wrap:anywhere}
.lm-notes{border-top:1px solid var(--line,#e1e7ef);padding-top:18px;margin-top:22px}
.lm-notes p{font-size:14px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:7px}
.lm-footer{padding:18px 26px;border-top:1px solid var(--line,#e1e7ef);display:flex;gap:10px;align-items:center;background:#f8fafc}
.lm-footer>div{flex:1;min-width:0}
.lm-footer p{font-size:12px;color:#28547d;line-height:1.5}
.lm-footer p[data-status="offline"],.lm-footer p[data-status="error"]{color:#b42318}
.lm-footer small{display:block;font-size:11px;color:#60748e;margin-top:4px;line-height:1.5}
.lm-footer button{flex:none}
.lm-missing{padding:32px;line-height:1.7}
@media(max-width:650px){
  .loan-monitor{width:calc(100vw - 20px);max-height:calc(100dvh - 24px);border-radius:16px}
  .lm-header{padding:18px}.lm-header h2{font-size:17px}
  .lm-layout{grid-template-columns:minmax(0,1fr);gap:22px;padding:18px}
  .lm-portrait{height:300px}
  .lm-fields{gap:16px 12px}
  .lm-footer{padding:16px 18px;flex-wrap:wrap}
  .lm-footer>div{flex-basis:100%}
  .lm-footer button{flex:1}
}
.loan-monitor{overflow:hidden}
.loan-monitor[open]{display:flex;flex-direction:column}
.lm-header,.lm-footer{flex:none}
.lm-header>div{min-width:0}
.lm-body{min-height:0;flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.lm-layout>*{min-width:0}
.lm-footer button{max-width:100%;white-space:normal}
@media(max-width:650px){.lm-footer{padding-bottom:calc(16px + env(safe-area-inset-bottom))}}
@media(max-height:520px) and (orientation:landscape){
 .loan-monitor{max-height:98dvh}
 .lm-header,.lm-footer{padding-top:10px;padding-bottom:10px}
 .lm-portrait{height:170px}
}
