[hidden]{display:none!important;}
:root{--navy:#10253c;--navy2:#193852;--gold:#c49b4b;--text:#15263a;--sub:#607188;--line:#dfe5eb;--bg:#f4f5f7}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}.bar{background:var(--navy);height:76px;display:flex;align-items:center;gap:24px;padding:10px max(20px,calc((100% - 1480px)/2));color:#e9ca8b}.bar img{max-height:58px;max-width:190px;object-fit:contain}.brand{display:flex;flex-direction:column;letter-spacing:1.5px}.brand small{font-size:10px;color:#ccad67}.bar a{margin-left:auto;color:#f0d098;text-decoration:none}.wrap{max-width:1480px;margin:22px auto;padding:0 20px 40px}.alert{background:#fff7e9;border-left:4px solid var(--gold);padding:13px 18px;margin-bottom:22px}.panel{background:white;border:1px solid var(--line);border-radius:12px;padding:20px;box-shadow:0 4px 15px #243b5908}.auth{max-width:470px;margin:48px auto;padding:26px}h1{font-size:26px;line-height:1.2;margin:0 0 8px}h2{font-size:20px;margin:0 0 8px}h3{font-size:17px;margin:0 0 10px}h4{font-size:14px;margin:0 0 6px}p{margin:6px 0 14px}label{font-size:13px;font-weight:600;display:block;margin:7px 0}input,select,textarea{font:inherit;width:100%;border:1px solid #c7d0da;border-radius:7px;padding:9px 10px;background:white;color:#14293e;outline-offset:2px}textarea{resize:vertical;min-height:80px}.btn{border:1px solid #b9c5d2;background:#fff;padding:9px 13px;color:var(--text);border-radius:7px;font:inherit;font-weight:700;cursor:pointer}.btn.gold{background:var(--gold);border-color:var(--gold);color:#12263b}.btn.danger{background:#fff1f0;color:#8f2830;border-color:#edc4c4}.btn.small{font-size:12px;padding:6px 9px}.btn:disabled{opacity:.48;cursor:not-allowed}.auth .btn{width:100%;margin-top:13px}.error{color:#b62233;font-weight:700}.ok{color:#18764a}.subtle,.fine{color:var(--sub)}.fine{font-size:12px}.headline{display:flex;align-items:end;justify-content:space-between;gap:20px;margin:6px 0 18px}.headline p{margin:0}.tools{display:flex;gap:10px;align-items:end}.tools label{margin:0;min-width:220px}.shell{display:grid;grid-template-columns:214px minmax(0,1fr);gap:18px;align-items:start}.side{background:var(--navy);border-radius:11px;padding:14px 10px;display:flex;flex-direction:column;gap:2px;position:sticky;top:12px}.side button,.side a{color:#dbe4ed;background:transparent;cursor:pointer;padding:11px 12px;border:0;text-align:left;border-radius:7px;text-decoration:none;font-size:13px;font-weight:600;font-family:inherit}.side button:hover,.side button.selected{background:#2b4864;color:#ffd98f}.side .legacy{border-top:1px solid #526274;margin-top:16px}.content{min-width:0}.module-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 12px}.module-head h2{margin:0;font-size:22px}.module-head p{margin:0}.module-actions{display:flex;gap:10px;align-items:center}.module-actions .show-archived{display:flex;gap:6px;align-items:center;white-space:nowrap}.show-archived input{width:auto}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 18px}.stat{background:var(--navy);color:white;padding:17px;border-radius:9px}.stat b{display:block;font-size:26px;line-height:1.2}.stat small{color:#e0c793}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.stack{display:grid;gap:16px}.toolbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-bottom:12px}.toolbar label{max-width:400px;flex:1;margin:0}.record{border-top:1px solid #e6ebf0;padding:12px 0;display:flex;align-items:center;justify-content:space-between;gap:12px}.record b,.record small{display:block}.record small{color:#64758a}.buttons{display:flex;gap:6px;flex-wrap:wrap}.empty{color:#67778b;padding:20px 0}.tag{font-size:11px;display:inline-block;border:1px solid #d4dde6;background:#edf3f7;padding:1px 7px;border-radius:20px;font-weight:600}.tag.warn{background:#fff0dd;border-color:#f0d09b;color:#7e5615}.tag.bad{background:#fff1f0;border-color:#f0c6c3;color:#992b2b}.banner{padding:12px 14px;background:#f0f5fa;border-left:3px solid #86a2c0;border-radius:5px;margin-bottom:13px}.warnbox{background:#fff8e8;border-left-color:#c49b4b}.table-scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:13px}th,td{border-bottom:1px solid #e4e9ef;padding:10px 8px;text-align:left;vertical-align:top}th{background:#f6f8fa}.link{background:none;border:0;cursor:pointer;text-decoration:underline;color:#25517a;font:inherit}.footer{padding:20px 0}dialog{border:0;border-radius:13px;max-width:760px;width:calc(100% - 26px);max-height:90vh;overflow:auto;padding:25px;box-shadow:0 20px 80px #101c3270}dialog::backdrop{background:#12243a9c}.fields{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px}.fields .wide{grid-column:span 2}.fields label{margin:1px 0}.fields label small{font-weight:400;color:#64758b}.dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}.toast{position:fixed;right:18px;bottom:18px;z-index:200;background:var(--navy);color:#fff;border-left:5px solid var(--gold);padding:14px 20px;max-width:530px;border-radius:7px;box-shadow:0 9px 40px #12203360}.drop{border:2px dashed #b4c2d0;padding:24px;border-radius:9px;background:#f8fafc}.small-print{font-size:12px;color:#596a80}.count{color:#63738b;font-size:13px}@media(max-width:1050px){.stats{grid-template-columns:repeat(2,1fr)}.grid2{grid-template-columns:1fr}.shell{grid-template-columns:190px 1fr}}@media(max-width:720px){.shell{grid-template-columns:1fr}.side{display:flex;flex-direction:row;overflow-x:auto;position:static;white-space:nowrap}.side button{flex-shrink:0}.headline,.module-head{align-items:stretch;flex-direction:column}.tools{flex-wrap:wrap}.stats{grid-template-columns:1fr 1fr}.fields{grid-template-columns:1fr}.fields .wide{grid-column:span 1}.bar{height:auto;min-height:70px;gap:8px;flex-wrap:wrap}.bar img{max-height:50px}.module-actions{justify-content:flex-start}}

/* V31: navigation from read-only Supabase-backed cards. */
.record-open{border:0;padding:0;background:transparent;color:var(--text);font:inherit;font-weight:750;text-align:left;cursor:pointer;line-height:1.5}
.record-open:hover,.record-open:focus-visible{color:#225c88;text-decoration:underline}
.view-action{border-color:#aebdca;background:#f7fafc}
#viewer{width:min(1100px,calc(100% - 32px));max-width:1100px;max-height:min(91vh,950px);padding:0;overscroll-behavior:contain}
#viewer .viewer-controls{display:flex;align-items:center;gap:10px;position:sticky;top:0;z-index:2;background:white;padding:14px 22px;border-bottom:1px solid var(--line)}
.viewer-mode{color:#536a80;letter-spacing:.12em;font-size:10px;font-weight:800}
.view-spacer{flex:1}
.viewer-body{padding:0 26px 26px;overflow:visible}
.view-heading{padding:24px 0 18px;border-bottom:2px solid var(--gold)}
.view-eyebrow{color:#7d602f;text-transform:uppercase;letter-spacing:.1em;font-size:11px;font-weight:750;margin:0 0 7px}
.view-heading h2{font-size:25px;line-height:1.3;margin:0 0 10px;overflow-wrap:anywhere}
.view-badge{display:inline-block;font-size:12px;padding:4px 10px;background:#fff3de;border:1px solid #ecd6a7;border-radius:20px;color:#79531d;font-weight:750}
.view-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:19px;align-items:start}
.view-section{padding:17px 18px;border:1px solid var(--line);background:#fcfdfe;border-radius:12px;min-width:0}
.view-section:first-child{grid-column:1/-1;background:white}
.view-section h3{font-size:15px;margin:0 0 12px;padding:0 0 9px;border-bottom:1px solid #e4e9ef}
.view-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px 17px;margin:0}
.view-fact{min-width:0}
.view-fact dt{font-size:11px;font-weight:750;color:#5e7186;margin-bottom:4px}
.view-fact dd{margin:0;color:#182c41;font-size:13px;overflow-wrap:anywhere;white-space:pre-wrap}
.linked-list{display:flex;flex-direction:column;gap:7px}
.linked-record{position:relative;width:100%;border:1px solid #dfe7ee;background:white;border-radius:8px;display:flex;flex-direction:column;align-items:flex-start;text-align:left;cursor:pointer;padding:9px 32px 9px 11px;line-height:1.35;font-weight:750;font:inherit;color:var(--text)}
.linked-record span:first-child{font-weight:750;overflow-wrap:anywhere}
.linked-record small{color:#65788c;font-size:11px;padding-top:3px}
.linked-record:hover,.linked-record:focus-visible{border-color:#c49b4b;background:#fffaf1}
.linked-arrow{position:absolute;right:12px;top:12px;color:#9a772e}
.view-empty{font-size:12px;color:#67788a;margin:0}
@media(max-width:800px){.view-sections{grid-template-columns:1fr}.view-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.viewer-body{padding:0 15px 18px}#viewer .viewer-controls{padding:10px 12px}}
@media(max-width:480px){.view-facts{grid-template-columns:1fr}.viewer-mode{display:none}.view-heading h2{font-size:20px}}

/* V37: contact types, staff names and certificate intake preview. */
.contact-role-picker{border:1px solid #dce4ee;border-radius:9px;padding:14px;margin:5px 0}.contact-role-picker legend{font-size:13px;font-weight:800;padding:0 5px}.role-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.role-option{display:flex;align-items:center;gap:7px;border:1px solid #d9e0e7;background:#fbfcfd;padding:10px;border-radius:7px;cursor:pointer;margin:0!important}.role-option input{width:16px;height:16px;flex-shrink:0;margin:0;accent-color:#a7813d}.role-option:has(input:checked){border-color:#b58c47;background:#fff7e8}.certificate-file-panel{border:1px dashed #d1b57a;background:#fffaf1;border-radius:11px;padding:16px;margin-top:14px}.certificate-file-panel h3{margin:0 0 7px}.certificate-steps{display:flex;gap:9px;flex-wrap:wrap;margin:14px 0}.certificate-steps span{border:1px solid #ead9b7;border-radius:6px;background:#fff;padding:7px;font-size:11px;font-weight:650}.certificate-file-controls{display:flex;gap:8px;flex-wrap:wrap}.file-warning{font-size:12px;color:#866421;background:#fff2d5;border-left:3px solid #cc9d4a;padding:12px;margin-top:12px}.staff-note{padding:12px;border-bottom:1px solid #e7ebf0;white-space:pre-wrap}.staff-note small{display:block;color:#72849a;margin-top:5px}.nh-logout{font-size:12px;border:1px solid #58697c;color:#e4c58d;padding:8px 10px;border-radius:7px;font-weight:750}.nh-logout:hover{border-color:#c6a15c}.nh-top-actions #logout-button-top{white-space:nowrap}.role-option:focus-within{outline:2px solid #af8641;outline-offset:2px}@media(max-width:680px){.role-options{grid-template-columns:repeat(2,1fr)}}


/* Private in-app preview of original verified PDFs/images; OCR is a separate action. */
dialog.document-preview-dialog{max-width:1200px;width:calc(100vw - 28px);max-height:95vh;padding:0;overflow:hidden}
.document-preview-shell{display:flex;flex-direction:column;max-height:95vh;min-height:300px}
.document-preview-top{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 19px 11px;border-bottom:1px solid var(--line);background:#fff}
.document-preview-top h2{font-size:16px;margin:3px 0 0;overflow-wrap:anywhere}
.document-preview-top button{flex-shrink:0}
.document-preview-status{font-size:12px;color:#52647a;margin:0;padding:9px 19px;background:#f8fafc}
.document-preview-surface{height:min(76vh,860px);min-height:270px;background:#e9eef4;display:flex;justify-content:center;align-items:center;overflow:auto}
#document-preview-frame{border:0;background:#fff;width:100%;height:100%;display:block}
#document-preview-image{max-width:100%;max-height:100%;object-fit:contain}
#document-preview-frame[hidden],#document-preview-image[hidden]{display:none!important}
@media(max-width:680px){dialog.document-preview-dialog{width:calc(100vw - 10px);max-height:96vh}.document-preview-shell{max-height:96vh}.document-preview-top{padding:11px}.document-preview-surface{height:76vh;min-height:230px}}


/* Read-only OCR correction draft. Values exist only within the current browser view. */
.ocr-correction-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 16px;margin:16px 0}
.ocr-correction-field{display:grid;gap:5px;min-width:0;margin:0!important}
.ocr-correction-field span{font-size:12px;font-weight:750;color:#415871}
.ocr-correction-field input{min-width:0;width:100%;font-size:13px;background:#fff}
.ocr-match-review,.ocr-evidence pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.6 ui-monospace,Menlo,Consolas,monospace;color:#203851}
.ocr-match-review{background:#f6f8fb;border-left:3px solid #c49b4b;border-radius:5px;padding:14px;margin:16px 0}
.ocr-evidence{border:1px solid var(--line);border-radius:8px;padding:10px 14px}
.ocr-evidence summary{cursor:pointer;font-weight:700}
@media(max-width:700px){.ocr-correction-grid{grid-template-columns:1fr}}

/* Full production uploader is hidden until authenticated server config explicitly authorises it. */
.ocr-upload-attestation{display:flex;gap:10px;align-items:start;margin:15px 0;font-size:13px;line-height:1.6;max-width:850px}
.ocr-upload-attestation input{margin-top:4px;flex:none}
#nh-production-uploader[hidden]{display:none!important}
#nh-production-uploader{border:1px solid var(--line);border-radius:10px;padding:18px;margin-bottom:20px}

/* Production document upload declaration: fixed checkbox-and-label row. */
#nh-production-uploader .nh-live-declaration-wrap .nh-confirm-row{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;width:max-content!important;max-width:100%!important;padding:12px 16px!important;background:#fff4d9!important;border:2px solid #d49a28!important;border-radius:8px!important;box-sizing:border-box!important}
#nh-production-uploader .nh-confirm-row input#nh-live-declaration{display:inline-block!important;position:static!important;float:none!important;width:24px!important;height:24px!important;min-width:24px!important;max-width:24px!important;flex:0 0 24px!important;margin:0!important;padding:0!important;accent-color:#b67908!important;appearance:checkbox!important;vertical-align:middle!important}
#nh-production-uploader .nh-confirm-row label[for="nh-live-declaration"]{display:inline-block!important;position:static!important;float:none!important;flex:0 1 auto!important;width:auto!important;min-width:0!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;background:none!important;line-height:1.4!important;font-size:14px!important;font-weight:700!important;vertical-align:middle!important;white-space:normal!important;cursor:pointer!important}

/* Quick Add: focused, keyboard-friendly phone call capture */
.nh-quick-add{max-width:980px;padding:24px}
.nh-quick-add>p{max-width:780px;line-height:1.65}
.nh-quick-add>label{display:block;margin:18px 0 8px;font-weight:750}
#nh-quick-note{width:100%;min-height:145px;box-sizing:border-box;padding:15px;line-height:1.6;font-size:15px;resize:vertical}
.nh-quick-result{margin-top:18px;padding:18px;background:#fff8e8;border:1px solid #d9ba72;border-radius:10px}
.nh-quick-result select{display:block;width:100%;max-width:450px;margin:8px 0 14px}
.nh-quick-result p{line-height:1.6}

/* Keys and Access CRM module */
.nh-keys-table{overflow-x:auto;margin-top:14px}.nh-keys-table table{width:100%;border-collapse:collapse;font-size:13px}.nh-keys-table th,.nh-keys-table td{text-align:left;padding:12px 10px;vertical-align:top;border-bottom:1px solid #e7edf2}.nh-keys-table th{color:#44586f;background:#f4f7fa;font-weight:750}.nh-key-dialog{width:min(640px,94vw);max-height:88vh;border:1px solid #d5dfe8;border-radius:12px;padding:24px;overflow-y:auto}.nh-key-dialog form{display:grid;gap:9px}.nh-key-dialog label{display:grid;gap:5px}.nh-key-dialog input,.nh-key-dialog select,.nh-key-dialog textarea{box-sizing:border-box}.nh-key-import{padding:14px;margin-top:12px;border:1px solid #e2e8f0;border-radius:9px;background:#fbfcfe;display:flex;gap:14px;flex-wrap:wrap;align-items:end}.nh-key-import label{flex:1 1 240px}.nh-key-import p{width:100%;margin:0}

/* Public NeighbourHub join enquiry form */
.nh-join-dialog{width:min(500px,calc(100vw - 32px));max-height:90vh;overflow:auto;border:1px solid #d7dde6;border-radius:13px;padding:24px;box-shadow:0 20px 65px #10253c44;color:#14293e;background:#fff}
.nh-join-dialog::backdrop{background:rgba(7,23,41,.65)}
.nh-join-dialog h2{margin:0 0 8px}
.nh-join-dialog label{display:block;margin:12px 0;font-weight:650}
.nh-join-dialog input,.nh-join-dialog select{display:block;width:100%;box-sizing:border-box;margin-top:5px}
.nh-join-dialog .nh-hidden-honeypot{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}
#join-neighbourhub-button{margin:10px 0 0 10px}

/* Consistent centred NeighbourHub confirmation dialogs */
.nh-decision-modal{position:fixed;inset:0;margin:auto;width:min(440px,calc(100vw - 32px));max-height:85vh;box-sizing:border-box;padding:26px;border:1px solid #d7bb80;border-top:5px solid #c49b4b;border-radius:13px;box-shadow:0 22px 70px #04172b66;background:#fff;color:#14293e;overflow:auto}
.nh-decision-modal::backdrop{background:rgba(4,19,37,.70);backdrop-filter:blur(2px)}
.nh-decision-modal h2{font-size:21px;line-height:1.3;color:#10253c;margin:0 0 12px}
.nh-decision-modal p{font-size:14px;line-height:1.65;margin:0 0 20px;white-space:pre-line}
.nh-decision-modal input{width:100%;box-sizing:border-box;margin:4px 0 18px}
.nh-decision-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
.nh-decision-actions .btn{min-width:100px;padding:10px 16px}
@media(max-width:450px){.nh-decision-modal{padding:20px}.nh-decision-actions .btn{flex:1}}

/* Batch document review: scrollable centred CRM dialog */
.nh-batch-review{width:min(740px,calc(100vw - 32px));max-height:88vh;overflow-y:auto}
.nh-batch-item{border:1px solid #dce4ed;background:#fafcff;border-radius:9px;padding:12px;margin:12px 0;display:grid;gap:7px}
.nh-batch-item strong{color:#10253c;overflow-wrap:anywhere}
.nh-batch-item select{width:100%;box-sizing:border-box}
.nh-batch-item label{display:block;font-weight:650;font-size:12px;margin:3px 0}
.nh-batch-item input[type=date]{display:block;width:100%;margin-top:5px;box-sizing:border-box}

/* Sidebar footer: keep account and logout inside narrow left rail */
.nh-sidebar .nh-sidebar-bottom{min-width:0;width:100%;box-sizing:border-box;padding-bottom:12px}
.nh-sidebar .nh-user{display:grid;grid-template-columns:28px minmax(0,1fr);gap:8px;align-items:center;min-width:0;padding:13px 2px 0}
.nh-sidebar .nh-user .nh-avatar{grid-row:1;grid-column:1}
.nh-sidebar .nh-user>div{grid-row:1;grid-column:2;min-width:0;overflow:hidden}
.nh-sidebar .nh-user b,.nh-sidebar .nh-user small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nh-sidebar .nh-user #logout-button{grid-row:2;grid-column:1 / -1;display:block;width:100%;box-sizing:border-box;margin:6px 0 0;padding:9px 10px;border:1px solid #58697c;border-radius:7px;text-align:center;font-size:12px;font-weight:750;color:#e4c58d;background:transparent;white-space:nowrap}
.nh-sidebar .nh-user #logout-button:hover{border-color:#c6a15c;color:#fff}

/* Free postcode lookup for property and contact addresses */
.nh-address-helper{background:#f7f9fc;border:1px solid #dce4ec;padding:12px 14px;border-radius:9px;min-width:0}
.nh-address-helper>label{display:block;font-size:12px;font-weight:700;color:#18334b;margin-bottom:7px}
.nh-address-lookup-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.nh-address-lookup-row input{flex:1 1 170px;min-width:0}
.nh-address-lookup-row button{flex:0 0 auto}
.nh-address-helper>select{display:block;width:100%;margin-top:9px}
.nh-address-helper>select[hidden]{display:none!important}
.nh-address-helper p{margin:9px 0 0;line-height:1.5}

/* Automatic address lookup: two fields, no separate search button */
.nh-address-helper .nh-address-lookup-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(130px,1fr);gap:10px;align-items:end}
.nh-address-helper .nh-address-lookup-row label{display:block;font-size:12px;font-weight:700;color:#18334b;min-width:0}
.nh-address-helper .nh-address-lookup-row input{display:block;width:100%;box-sizing:border-box;margin-top:6px}
@media(max-width:500px){.nh-address-helper .nh-address-lookup-row{grid-template-columns:1fr}}

/* Single-field address autocomplete and selectable suggestions */
.nh-address-autocomplete{min-width:0;position:relative}
.nh-address-autocomplete>label{display:block;font-size:12px;font-weight:700;color:#18334b}
.nh-address-autocomplete input{display:block;width:100%;box-sizing:border-box;margin:6px 0 7px}
.nh-address-results{max-height:235px;overflow:auto;border:1px solid #d5b372;background:#fff;border-radius:8px;box-shadow:0 6px 20px #10253c22}
.nh-address-results[hidden]{display:none!important}
.nh-address-option{display:block;width:100%;padding:12px;text-align:left;background:#fff;border:0;border-bottom:1px solid #eef1f4;color:#122f4c;font-size:13px;cursor:pointer}
.nh-address-option:hover,.nh-address-option:focus{background:#fff1d3;outline:2px solid #ba944f;outline-offset:-2px}
.nh-address-autocomplete .small-print{margin:8px 0;line-height:1.5}

/* Production uploader: prevent legacy generic form and label rules squeezing declarations. */
#nh-production-uploader .nh-live-declaration-wrap{display:block!important;grid-column:1/-1;width:100%!important;min-width:0!important;max-width:none!important;margin:20px 0 14px!important;box-sizing:border-box!important;clear:both}
#nh-production-uploader .nh-document-declaration-copy{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0 0 12px!important;color:#263d52;line-height:1.65!important;white-space:normal!important;overflow-wrap:break-word}
#nh-production-uploader .nh-live-declaration-wrap .nh-confirm-row{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;padding:12px 16px!important;background:#fff4d9!important;border:2px solid #d49a28!important;border-radius:8px!important;text-align:left!important;cursor:pointer}
#nh-production-uploader .nh-confirm-row input#nh-live-declaration{display:block!important;position:static!important;flex:0 0 23px!important;width:23px!important;height:23px!important;min-width:23px!important;max-width:23px!important;margin:0!important;padding:0!important;appearance:auto!important;accent-color:#b67908!important}
#nh-production-uploader .nh-confirm-row span{display:block!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;max-width:none!important;font-weight:750!important;line-height:1.45!important;white-space:normal!important;overflow-wrap:normal!important}
#nh-production-uploader .ocr-correction-grid{align-items:end}
#nh-production-uploader .certificate-file-controls{margin-top:12px}
#nh-production-uploader .certificate-file-controls .btn.gold{min-height:40px}
@media(max-width:650px){#nh-production-uploader .nh-live-declaration-wrap .nh-confirm-row{padding:12px!important}#nh-production-uploader .nh-confirm-row span{font-size:13px!important}}

/* Futuristic Quick Add command workspace */
.nh-future-quickadd{position:relative;isolation:isolate;overflow:hidden;max-width:1120px;margin:8px auto 36px;padding:38px 46px 35px;border:1px solid #244367;border-radius:20px;background:radial-gradient(ellipse at 85% 0%,#15365b 0%,transparent 47%),linear-gradient(135deg,#06152d,#081d3b 66%,#0a2446);box-shadow:0 26px 60px #07172f2e;color:#e8eff7}
.nh-ai-orbit{pointer-events:none;position:absolute;z-index:-1;border:1px solid #cfac5b2a;border-radius:50%;transform:rotate(-27deg)}.nh-ai-orbit-a{width:520px;height:230px;right:-150px;top:-100px}.nh-ai-orbit-b{width:390px;height:180px;right:-105px;top:-52px}
.nh-ai-hero{display:flex;justify-content:space-between;gap:15px;align-items:center;font:700 10px Arial,sans-serif;letter-spacing:2px}.nh-ai-live{color:#e8c979}.nh-ai-live i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#6ae0c4;box-shadow:0 0 12px #6ae0c4;margin-right:9px}.nh-ai-version{color:#849cba}
.nh-ai-heading{display:flex;align-items:center;gap:20px;margin:38px 0}.nh-ai-heading h2{margin:0;color:white;font:600 clamp(29px,4vw,45px)/1.15 Georgia,serif;letter-spacing:-1px}.nh-ai-heading em{font-style:normal;color:#e3ba65}.nh-ai-heading p{color:#aebfd2;font-size:15px;margin:12px 0 0}.nh-ai-spark{display:grid;place-items:center;min-width:66px;height:66px;border-radius:18px;background:linear-gradient(145deg,#e5c778,#88692e);box-shadow:0 0 24px #d7ac4855;font-size:41px;color:#071932}
.nh-ai-command{border-radius:14px;background:#0c2443;border:1px solid #31506e;box-shadow:0 12px 35px #020b1b55;overflow:hidden}.nh-ai-command-head{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid #284665;padding:17px 21px;color:#e8c779;font:700 11px Arial,sans-serif;letter-spacing:1.5px}.nh-ai-command-icon{font-size:17px;margin-right:8px}.nh-ai-command-help{color:#88a1bb;font-size:10px}.nh-ai-command textarea{display:block;box-sizing:border-box;width:100%;min-height:205px;padding:23px;border:0;outline:0;resize:vertical;background:transparent;color:#fff;font:15px/1.7 Arial,sans-serif;box-shadow:none}.nh-ai-command textarea::placeholder{color:#8dabc7}.nh-ai-command textarea:focus{box-shadow:inset 0 0 0 2px #be9b54}.nh-ai-command-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:14px 17px;border-top:1px solid #284665;background:#091d37}.nh-ai-command-footer>span{font-size:12px;color:#a5bad0}.nh-ai-shield{color:#d7b566;margin-right:5px}.nh-ai-launch{border:0;border-radius:8px;background:linear-gradient(135deg,#f3d58a,#cca14a);color:#071932;padding:14px 18px;font-weight:800;display:flex;gap:24px;align-items:center;cursor:pointer;box-shadow:0 5px 20px #cda04440}.nh-ai-launch:hover{filter:brightness(1.09);transform:translateY(-1px)}.nh-ai-launch:disabled{opacity:.55;cursor:wait}.nh-ai-arrow{font-size:18px}
.nh-ai-capabilities{margin:27px 0 15px;display:flex;align-items:center;gap:20px;flex-wrap:wrap}.nh-ai-capabilities>span{color:#8fa8c3;font:700 10px Arial,sans-serif;letter-spacing:1.5px}.nh-ai-capabilities>div{display:flex;gap:8px;flex-wrap:wrap}.nh-ai-capabilities>div span{border:1px solid #365371;background:#ffffff08;color:#bfd0df;padding:8px 12px;border-radius:20px;font-size:12px}.nh-ai-status{font-size:12px;color:#7de7c7;margin:21px 0}.nh-ai-output .nh-quick-result{background:#f8f8f5;color:#122741;border:1px solid #dbbf7c;border-radius:12px;padding:22px;margin-top:18px}.nh-ai-output .nh-quick-result h3,.nh-ai-output .nh-quick-result strong{color:#112b4e}.nh-ai-disclaimer{border-top:1px solid #2c4660;margin:25px 0 0;padding-top:20px;font-size:11px;line-height:1.6;color:#829bb6}.nh-ai-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:700px){.nh-future-quickadd{padding:25px 19px;border-radius:12px}.nh-ai-heading{gap:12px}.nh-ai-spark{min-width:45px;height:45px;font-size:30px}.nh-ai-version,.nh-ai-command-help{display:none}.nh-ai-command-footer{align-items:stretch}.nh-ai-launch{width:100%;justify-content:space-between}}

/* Staff onboarding: always show the resend section, even when no eligible account is selected. */
#invite-staff-dialog .nh-activation-panel{display:block!important;visibility:visible!important;margin-top:15px;padding:15px;border:1px solid #e2d0aa;border-radius:10px;background:#fffaf0}
#invite-staff-dialog .nh-activation-panel strong{display:block;color:#19324c;font-size:14px}
#invite-staff-dialog .nh-activation-panel .fine{margin:6px 0 10px}
#invite-staff-dialog #manage-staff-resend{display:inline-block!important;visibility:visible!important;min-height:40px;opacity:1}
#invite-staff-dialog #manage-staff-resend:disabled{opacity:.52;cursor:not-allowed}


/* Secure EPC preview appears directly on the compliance/property/certificate card.
   No public PDF URLs or unverified compliance approvals. */
.nh-epc-embedded{min-width:0;grid-column:1/-1}
.nh-epc-embedded-status{
  margin:8px 0 10px;padding:10px 12px;border-radius:8px;border:1px solid #e6d3a4;
  background:#fff8e7;color:#785309;font-size:13px;font-weight:700;
}
.nh-epc-embedded [data-epc-inline-status]{margin:8px 0 12px;color:#465a72}
.nh-epc-embedded [data-epc-inline-frame]{
  display:block;width:100%;height:180px;max-height:22vh;margin:0 0 12px;
  border:1px solid #d4dce6;border-radius:9px;background:#f7f9fb;
}
.nh-epc-embedded [data-epc-inline-frame][hidden]{display:none!important}
.nh-epc-embedded .certificate-file-controls{display:flex;flex-wrap:wrap;gap:8px}
@media(max-width:700px){
  .nh-epc-embedded [data-epc-inline-frame]{height:130px;max-height:18vh}
  .nh-epc-embedded .certificate-file-controls .btn{min-height:42px}
}


/* An expired certificate must stay unmistakably red, including when the
   uploaded document is still awaiting staff approval. Never style the
   original PDF itself or claim that its expiry has been extended. */
.nh-cert-expired-row td,
.nh-cert-expired-row td .record-open,
.nh-cert-expired-row td .tag,
.nh-cert-expired-row td button:not(.btn){color:#b42318!important;font-weight:700}
.nh-cert-expired-row td .tag{background:#fff1f0;border-color:#e8a3a0}
.nh-cert-expired-row{background:#fff5f4}
.nh-cert-expired-card h2,
.nh-cert-expired-card h3,
.nh-cert-expired-card h4,
.nh-cert-expired-card .view-eyebrow,
.nh-cert-expired-card .view-fact dt,
.nh-cert-expired-card .view-fact dd,
.nh-cert-expired-card .small-print,
.nh-cert-expired-card .view-empty,
.nh-cert-expired-card .nh-epc-embedded-status,
.nh-cert-expired-card .nh-property-document,
.nh-cert-expired-card .linked-list,
.nh-cert-expired-card .linked-list a,
.nh-cert-expired-card .nh-epc-embedded-status{color:#b42318!important}
.nh-cert-expired-card .nh-epc-embedded-status{background:#fff0ef;border-color:#e8a3a0}
.nh-cert-expired-card .nh-expired-badge,
.nh-cert-expired-card .view-badge{background:#fee7e5!important;color:#a82017!important;border:1px solid #e8a3a0}
.nh-cert-expired-alert{
 display:block;margin:0 0 14px;padding:13px 14px;border-radius:9px;
 background:#fff0ef;border:2px solid #c52218;color:#a82017;
 font-weight:700;line-height:1.45
}
.nh-cert-expired-alert strong{font-weight:900;letter-spacing:.045em}
.nh-compliance-overview-heading{font-weight:800;font-size:14px;color:#0a2a45;
 padding:12px 14px;border:1px solid #e6d8bb;border-radius:8px;background:#fff9ee;margin:0 0 13px}
.nh-cert-expired-card .view-section{border-color:#f0c6c2}


/* Portfolio compliance counters: actionable, clearly distinguish missing from expired. */
.stats .nh-compliance-kpi{
 appearance:none;width:100%;min-width:0;display:block;text-align:left;
 border:1px solid #e7d5a9;cursor:pointer;font:inherit;
 background:#fff9ed;color:#80500a;transition:box-shadow .15s ease,transform .15s ease;
}
.stats .nh-compliance-kpi b{color:#8b5200}
.stats .nh-compliance-kpi small{color:#775c31}
.stats .nh-compliance-kpi-expired{
 background:#fff1f0;border-color:#efbfbd;color:#a32016;
}
.stats .nh-compliance-kpi-expired b{color:#ae2117}
.stats .nh-compliance-kpi-expired small{color:#9b3b33}
.stats .nh-compliance-kpi:hover{box-shadow:0 4px 13px #00000016;transform:translateY(-1px)}
.stats .nh-compliance-kpi:focus-visible{outline:3px solid #1d73b7;outline-offset:2px}
.nh-compliance-focus{
 display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:flex-start;
 padding:12px 14px;margin:0 0 12px;border-radius:9px;
 border:1px solid #dcc8a3;background:#fffaf2;color:#6e4a11;
}
.nh-compliance-focus span{margin-right:auto;font-weight:600;font-size:12px}

/* Compact EPC PDF preview: full-sized view remains available separately. */
.nh-epc-draft-preview [data-epc-draft-frame]{height:220px!important;max-height:23vh!important;min-height:0!important}
@media(max-width:700px){.nh-epc-draft-preview [data-epc-draft-frame]{height:150px!important;max-height:19vh!important}}

/* Official EPC search: make an eligible certificate's address an obvious,
   keyboard-accessible import action (staff confirmation still follows). */
.nh-epc-address-select{display:block;width:100%;padding:7px 0;border:0;background:transparent;text-align:left;color:#173e6a;font-size:14px;font-weight:700;line-height:1.5;font-family:inherit;cursor:pointer}
.nh-epc-address-select:hover{text-decoration:underline;color:#8c641d}
.nh-epc-address-select:focus-visible{outline:3px solid #b99243;outline-offset:3px;border-radius:4px}
.nh-epc-selection-hint{margin:8px 0 0;color:#287052;font-weight:650}

/* EPC lookup: once results arrive, use the full card width instead of
   expanding the right half of the two-column compliance overview.
   Keep initial overview layout unchanged until a search has results. */
#viewer .view-sections > .view-section.nh-epc-results-expanded{
 grid-column:1/-1;
 width:100%;
 min-width:0;
 box-sizing:border-box;
}
#viewer .nh-epc-results-expanded [data-epc-result]{
 display:block;
 width:100%;
 max-width:100%;
 box-sizing:border-box;
 overflow-wrap:anywhere;
}
#viewer .nh-epc-results-expanded .nh-epc-record{
 width:100%;
 min-width:0;
 box-sizing:border-box;
}
#viewer .nh-epc-results-expanded .nh-epc-address-select{
 max-width:100%;
 text-align:left;
 white-space:normal;
 overflow-wrap:anywhere;
}
#viewer .nh-epc-results-expanded .nh-epc-other-postcode,
#viewer .nh-epc-results-expanded .nh-epc-history{
 max-width:100%;
 box-sizing:border-box;
 overflow-wrap:anywhere;
}

/* Keep unapproved bulk-import rows editable without cluttering the main CRM. */
.nh-import-draft-info{background:#f4f8fc;border:1px solid #dce5ef;border-left:4px solid #caa55c;border-radius:10px;padding:13px 15px;color:#29425c;line-height:1.55}
.nh-import-pending-summary{background:#fff7e8;border:1px solid #ead8af;border-radius:9px;padding:12px 15px;color:#614919;font-weight:600}
.nh-import-row-actions{white-space:nowrap;min-width:128px}
.nh-import-row-actions .btn{margin-right:5px;min-width:36px}
.nh-import-row-actions .danger{font-size:18px;line-height:1;padding:7px 11px}
.nh-import-edit-row td{padding:0!important;background:#f5f8fc}
.nh-import-edit-form{border:1px solid #d7e3f0;border-radius:10px;margin:12px;padding:18px;background:#fafdff;box-shadow:0 8px 25px #183b6310}
.nh-import-edit-form h4{font-size:17px;color:#173451;margin:0 0 7px}
.nh-import-edit-form p{color:#536b85;line-height:1.5;margin:0 0 12px}
.nh-import-edit-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 16px}
.nh-import-edit-grid label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:700;color:#183b60;min-width:0}
.nh-import-edit-grid input,.nh-import-edit-grid select{width:100%;max-width:100%;box-sizing:border-box;border:1px solid #cad9e8;border-radius:7px;min-height:39px;padding:8px 10px;background:white;color:#263d54;font-size:13px}
.nh-import-edit-grid label:has(.nh-import-address-field){grid-column:span 2}
.nh-import-edit-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.nh-import-review-footer{padding:11px 14px;border:1px solid #e1e8f0;border-radius:8px;background:#f9fbff;font-size:12px;margin-top:13px}
@media(max-width:900px){.nh-import-edit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){.nh-import-edit-grid{grid-template-columns:1fr}.nh-import-edit-grid label:has(.nh-import-address-field){grid-column:auto}.nh-import-edit-form{padding:12px}.nh-import-edit-actions .btn{width:100%}}
