:root{font:16px system-ui,sans-serif;color:#073f35;background:#f1f7f3}*{box-sizing:border-box}body{margin:0}main{max-width:1000px;margin:auto;padding:24px}header{background:linear-gradient(115deg,#acd90a,#02826b);padding:32px;border-radius:24px;color:white}h1{font-size:48px;font-weight:400;margin:0}h1 span{background:white;color:#02826b;padding:0 12px;border-radius:12px;font-size:32px}form,article{padding:24px;background:white;border-radius:20px;margin:18px 0;border:1px solid #e1ece5}label{display:block;margin:14px 0}input,select,button{font:inherit;border-radius:10px;padding:12px;border:1px solid #b7cfc4}input:not([type=checkbox]),select{display:block;width:100%;margin-top:6px}button{background:#02826b;color:white;cursor:pointer;margin:4px}button:disabled{opacity:.5}nav{margin-top:20px}table{border-collapse:collapse;width:100%;background:white}td,th{text-align:left;padding:12px;border-bottom:1px solid #e1ece5}#message{color:#9d2424}a{color:#007763}small{display:block;color:#53675e} [hidden]{display:none!important}
main{max-width:1200px}header{padding:24px 32px}h2{margin:0 0 8px}.section-head{display:flex;justify-content:space-between;gap:20px;align-items:center;flex-wrap:wrap}.section-head p{color:#53675e;margin:0}#crm{margin-top:32px}.crm-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.crm-tools label{flex:1;min-width:140px}.crm-tools label:nth-child(2){flex:3}.crm-tools button{margin-bottom:14px}.record-row{display:grid;grid-template-columns:minmax(140px,2fr) minmax(100px,1fr) minmax(120px,1fr) auto;gap:16px;align-items:center;width:100%;padding:14px 18px;margin:6px 0;background:white;color:#073f35;border:1px solid #e1ece5;text-align:left;border-radius:14px}.record-row:hover{border-color:#02826b}.record-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.record-row small{font-size:12px}.pagination{display:flex;align-items:center;justify-content:center;gap:12px;margin:18px 0}dialog{border:0;border-radius:24px;padding:28px;max-width:740px;width:calc(100% - 32px);max-height:90vh;overflow:auto;color:#073f35;box-shadow:0 24px 90px #00372e55}dialog::backdrop{background:#00372e88}dialog form{border:0;margin:0;padding:0}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}fieldset{border:1px solid #e1ece5;border-radius:14px;margin:20px 0;padding:16px}legend{font-weight:600}#formError{color:#9d2424}dl{display:grid;grid-template-columns:1fr 2fr;gap:12px}dt{color:#53675e}dd{margin:0;overflow-wrap:anywhere}.detail-actions{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.document-button{display:block;background:#f1f7f3;color:#007763;text-align:left;width:100%;margin:8px 0;overflow-wrap:anywhere}#owner{margin:24px 0}#accounts{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}#accounts article{margin:0;padding:16px}#login{max-width:440px;margin:32px auto}#message:empty{display:none}#message{padding:12px;background:#fff;border-radius:12px}input:focus,button:focus-visible,select:focus{outline:3px solid #9bc73e;outline-offset:2px}@media(max-width:600px){main{padding:16px}.field-grid{grid-template-columns:1fr}.record-row{grid-template-columns:1fr auto;gap:4px 12px}.record-row .seller{display:none}.record-row .place{grid-column:1;grid-row:2}.record-row .date{grid-column:2;grid-row:2}dialog{padding:20px}.crm-tools label{min-width:120px}dl{grid-template-columns:1fr}dd{margin-bottom:8px}}
header{border-radius:0;box-shadow:none;padding:22px 28px;display:flex;align-items:center;justify-content:space-between;gap:24px}header p{margin:0;font-size:14px}.brand-logo{display:flex;align-items:center;gap:12px;margin:0;width:310px;max-width:100%;height:52px;flex-shrink:0}.brand-logo .brand-wordmark{position:relative;display:block;width:215px;height:42.38px;padding:0;border-radius:0;background:transparent;overflow:hidden;mix-blend-mode:screen}.brand-wordmark img{position:absolute;max-width:none;width:421.36px;height:235.17px;left:-95.67px;top:-80.24px;filter:grayscale(1) brightness(.57) contrast(20)}.brand-logo .brand-go{display:flex;align-items:center;justify-content:center;width:83px;height:52px;background:white;color:#02826b;border-radius:12px;padding:0;font-size:32px;font-weight:600;letter-spacing:1px}@media(max-width:600px){header{padding:20px 16px;flex-direction:column;align-items:flex-start;gap:12px}.brand-logo{transform-origin:left center;transform:scale(.86);width:310px;max-width:none;margin-right:-44px}}
.brand-logo .brand-go{font-weight:300;font-family:ui-rounded,-apple-system,BlinkMacSystemFont,sans-serif}
.brand-logo .brand-wordmark{mix-blend-mode:normal}.brand-wordmark img{filter:grayscale(1) brightness(.57) contrast(20) url(#wordmark-alpha)}
.owner-access{display:flex;justify-content:flex-end}.owner-access button{background:white;color:#007763;border:1px solid #b7cfc4;font-size:14px}
header #logout{margin:0 0 0 auto;background:transparent;color:white;border:1px solid #ffffff99;padding:10px 18px;flex-shrink:0}header{flex-direction:row;flex-wrap:wrap;align-items:center}header #logout[hidden]{display:none}
#headerActions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-left:auto}#headerActions button{margin:0;background:white;color:#007763;padding:10px 14px;border:1px solid #ffffff99;font-size:14px}#headerActions #logout{margin:0;background:transparent;color:white}@media(max-width:760px){header{gap:16px}#headerActions{width:100%;justify-content:flex-end}}
.record-head,.record-row{grid-template-columns:minmax(0,1.25fr) minmax(70px,.6fr) minmax(0,1fr);gap:16px}.record-head{display:grid;padding:12px 18px 6px;color:#53675e;font-size:13px}.record-row .seller{display:block;font-size:14px;overflow-wrap:anywhere}.contact-status{color:#73877e;font-size:14px}.record-row strong{white-space:normal;overflow-wrap:anywhere}@media(max-width:600px){.record-head,.record-row{grid-template-columns:minmax(0,1fr) 48px minmax(0,1fr);gap:10px;padding-left:12px;padding-right:12px}.record-head{font-size:11px}.record-row strong,.record-row .seller{font-size:13px}.record-row .seller{display:block}}
.contact-table{overflow-x:auto;padding-bottom:4px}.record-head,.record-row{grid-template-columns:minmax(150px,1.5fr) 120px 80px minmax(140px,1.2fr) minmax(90px,.7fr);min-width:690px;gap:16px}.record-head{font-size:12px}.signed-date{font-size:13px;color:#53675e}.contact-product{font-size:13px;color:#007763;font-weight:600}.record-row strong,.record-row .seller{font-size:14px}@media(max-width:600px){.record-head,.record-row{grid-template-columns:minmax(150px,1.5fr) 120px 80px minmax(140px,1.2fr) minmax(90px,.7fr);gap:16px}}
/* Full-width CRM columns, aligned between heading and contact rows. */
main{max-width:none;width:100%;padding:24px clamp(16px,2.2vw,40px)}
.record-head,.record-row{grid-template-columns:minmax(160px,1fr) minmax(120px,1fr) minmax(90px,1fr) minmax(160px,1fr) minmax(100px,1fr);width:100%;min-width:740px;gap:20px}
.record-head>span:not(:first-child),.record-row>span{text-align:center}
@media(max-width:600px){main{padding:16px}.record-head,.record-row{grid-template-columns:minmax(160px,1fr) minmax(120px,1fr) minmax(90px,1fr) minmax(160px,1fr) minmax(100px,1fr);gap:16px}}
#mapSection{margin-top:26px}#contactMap{height:480px;min-height:320px;border-radius:18px;isolation:isolate;background:#e5ede7}.map-legend{display:flex;gap:22px;flex-wrap:wrap;margin:12px 0;font-size:14px}.map-legend>span:first-child{color:#02826b}.map-legend>span:nth-child(2){color:#2478c8}.map-precision{font-size:12px;color:#53675e}#mapStatus:empty{display:none}#mapStatus{font-size:13px}.map-result{display:block;width:100%;text-align:left;background:white;color:#073f35;margin:8px 0;border-color:#e1ece5}.map-contact-link{display:block;background:white;color:#007763;border:0;padding:8px 0;margin:0;font-size:13px;text-align:left}.leaflet-control button,.leaflet-control a{color:#073f35}.leaflet-container{font-family:inherit}.leaflet-control-attribution{font-size:11px}@media(max-width:600px){#contactMap{height:380px}.map-legend{gap:12px}}
textarea{font:inherit;width:100%;display:block;margin-top:6px;border:1px solid #b7cfc4;border-radius:10px;padding:12px;resize:vertical}dd{white-space:pre-wrap}
.record-head,.record-row{grid-template-columns:minmax(160px,1.4fr) minmax(110px,1fr) minmax(70px,.7fr) minmax(140px,1.2fr) minmax(80px,.7fr) minmax(140px,1fr);min-width:850px;gap:16px}.contact-name{border:0;background:transparent;color:#073f35;text-align:left;font-size:14px;font-weight:600;padding:0;margin:0;overflow-wrap:anywhere}.row-documents{min-width:0;font-size:13px}.row-documents summary{color:#007763;cursor:pointer;padding:8px;text-align:center}.row-documents .document-button{font-size:12px;padding:8px;margin:4px 0;white-space:normal}.missing-document{display:block;color:#845324;padding:6px;font-size:12px}.record-row:has(details[open]){align-items:start}

.record-head,.record-row{grid-template-columns:minmax(160px,1fr) minmax(120px,1fr) minmax(90px,1fr) minmax(160px,1fr) minmax(100px,1fr);min-width:740px;gap:20px}
@media(max-width:600px){.record-head,.record-row{gap:16px}}

.document-slot{display:grid;gap:7px;padding:13px 0;border-bottom:1px solid #e7ece9}.document-slot:last-child{border-bottom:0}.document-slot strong{font-size:14px;font-weight:600}.document-slot .document-button{margin:0;text-align:left;overflow-wrap:anywhere;white-space:normal}.document-missing{font-size:13px;color:#8a651e}

.document-slot{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;min-height:52px}.document-controls{display:flex;align-items:center;justify-content:flex-end;gap:12px}.document-added,.document-missing{font-size:13px}.document-added{color:#08775e}.document-controls .document-button{width:auto;padding:8px 12px;font-size:13px}

#crm.client-list .record-head,#crm.client-list .record-row{grid-template-columns:minmax(160px,1fr) minmax(120px,1fr) minmax(160px,1fr) minmax(100px,1fr);min-width:620px}

.contact-table{max-height:60vh;overflow:auto;scrollbar-gutter:stable}.contact-table .record-head{position:sticky;top:0;z-index:1;background:#f1f7f3;padding-top:14px;padding-bottom:14px}.pagination{flex-wrap:wrap}.pagination .page-size{display:flex;align-items:center;gap:10px;margin:0;font-size:13px}.pagination .page-size select{width:auto;min-width:68px;margin:0;padding:9px 12px}

.contact-table{max-height:none}.record-row{height:54px;min-height:54px;margin:6px 0;padding-top:8px;padding-bottom:8px;box-sizing:border-box}.record-row .contact-name,.record-row .seller{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.pagination{margin:16px 0}

#recordDialog{padding:0;background:white}#recordDialog>.section-head{padding:24px 28px;background:linear-gradient(115deg,#acd90a,#02826b);color:white;flex-wrap:nowrap;gap:18px}#recordDialog #detailTitle{color:white;margin:0;font-size:26px;font-weight:600;line-height:1.25;overflow-wrap:anywhere;min-width:0}#recordDialog #closeDetail{background:transparent;border:1px solid #ffffff99;color:white;margin:0;flex-shrink:0;font-size:14px}#recordDetail{padding:24px 28px}@media(max-width:600px){#recordDialog>.section-head{padding:20px;gap:12px}#recordDialog #detailTitle{font-size:22px}#recordDetail{padding:20px}}
header:has(#headerActions[hidden]){justify-content:center}
header:has(#headerActions[hidden]) .brand-logo{width:310px;justify-content:center;margin:0;transform:none}
@media(max-width:600px){header:has(#headerActions[hidden]) .brand-logo{width:100%;max-width:310px;flex-shrink:1;gap:10px}header:has(#headerActions[hidden]) .brand-wordmark{flex-shrink:1}header:has(#headerActions[hidden]) .brand-go{flex-shrink:0}}

#recordDialog{margin-top:26px;width:100%;max-width:none;border-radius:16px;overflow:hidden}#recordDialog>.section-head{flex-wrap:wrap}#recordDetail{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:36px;padding:28px}#recordDetail>section{min-width:0}#recordDetail .contact-documents{border-left:1px solid #e1ece5;padding-left:32px}#recordDetail h3{font-size:17px;margin:0 0 18px}#recordDetail dl+h3{margin-top:28px}#recordDetail dl{grid-template-columns:minmax(120px,1fr) minmax(0,1.3fr);margin:0 0 24px;gap:14px 20px}#recordDetail .document-slot{padding:14px 0}#recordDetail .document-slot strong{overflow-wrap:anywhere}@media(max-width:800px){#recordDetail{grid-template-columns:1fr;gap:20px;padding:20px}#recordDetail .contact-documents{border-left:0;border-top:1px solid #e1ece5;padding:24px 0 0}}@media(max-width:420px){#recordDetail dl{grid-template-columns:1fr;gap:5px}#recordDetail dd{margin-bottom:10px}}
#recordDialog{border-radius:0}#recordDialog>.section-head{padding:12px 24px;gap:12px;border-radius:0}#recordDialog #detailTitle{font-size:20px;font-weight:500;line-height:1.3}#recordDialog #closeDetail{padding:7px 12px;font-size:13px;border-radius:6px}@media(max-width:600px){#recordDialog>.section-head{padding:12px 16px}#recordDialog #detailTitle{font-size:18px}}
#recordDialog{margin-top:10px}

#recordEditor{margin-top:10px;background:white;width:100%}#recordForm{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px 32px;border:0;border-radius:0;margin:0;padding:0 28px 28px}#recordForm>.section-head{grid-column:1/-1;margin:0 -28px;padding:12px 24px;background:linear-gradient(115deg,#acd90a,#02826b);color:white}#recordForm #editorTitle{font-size:20px;font-weight:500;margin:0}#recordForm #cancelRecord{padding:7px 12px;font-size:13px;background:transparent;border:1px solid #ffffff99;color:white;margin:0}#recordForm #formError{grid-column:1/-1;margin:0}#recordForm #formError:empty{display:none}#recordForm #customerFields{align-content:start;gap:0 20px}#recordForm fieldset{margin:0;min-width:0;padding:18px;border-color:#e1ece5}#recordForm #contractInfo{grid-column:2;grid-row:2 / span 2}#recordForm #documentFields{grid-column:1/-1}#recordForm #fileFields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 24px}#recordForm input[type=file]{font-size:14px;min-width:0;max-width:100%}#recordForm textarea{width:100%;font:inherit;padding:12px;border:1px solid #b7cfc4;border-radius:10px;resize:vertical}#recordForm #saveRecord{grid-column:1/-1;justify-self:end;min-width:180px;margin:0}@media(max-width:800px){#recordForm{grid-template-columns:1fr;padding:0 20px 20px;gap:20px}#recordForm>.section-head{margin:0 -20px;padding:12px 20px}#recordForm #contractInfo{grid-column:auto;grid-row:auto}#recordForm #fileFields{grid-template-columns:1fr}}

#headerActions #logout,#headerActions #closeDetail,#headerActions #cancelRecord{width:140px;height:42px;box-sizing:border-box;margin:0;padding:10px 12px;background:transparent;color:white;border:1px solid #ffffff99;border-radius:10px;font:400 14px system-ui,sans-serif;white-space:nowrap;flex-shrink:0}

/* Consistent full-page customer and contract forms. */
#recordForm{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:24px;padding:0 28px 28px}
#recordForm>.section-head{margin:0 -28px}
#recordForm #customerSection,#recordForm #equipmentFields{grid-column:auto;grid-row:auto;align-self:stretch}
#recordForm #contractInfo,#recordForm #saleFields,#recordForm #documentFields{grid-column:1/-1;grid-row:auto}
#recordForm fieldset{padding:22px;border-radius:12px;background:#fff}
#recordForm legend{font-size:16px;font-weight:600;padding:0 8px;color:#075b49}
#recordForm label{margin:0;min-width:0;font-size:14px;color:#385e50}
#recordForm .field-grid,#recordForm #customerFields,#recordForm #fileFields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px}
#recordForm #contractInfo{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 24px}
#recordForm #saleFields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px}
#recordForm input,#recordForm select,#recordForm textarea{min-height:44px;margin-top:7px;background:#f8faf8;color:#073f35;font-size:15px;border-color:#cddcd3;border-radius:8px}
#recordForm #documentFields>p{font-size:13px;color:#61776b;margin:0 0 20px}
#recordForm #fileFields label{padding:14px 16px;border:1px solid #e1e9e3;border-radius:8px;background:#f8faf8}
#recordForm input[type=file]{background:transparent;border:0;padding:4px 0;min-height:36px;font-size:13px}
#recordForm input[type=file]::file-selector-button{background:white;color:#08765e;border:1px solid #cddcd3;border-radius:6px;padding:8px 12px;margin-right:10px;cursor:pointer}
#recordForm #saveRecord{padding:12px 28px;min-width:180px}
@media(max-width:850px){#recordForm{grid-template-columns:1fr;padding:0 20px 20px;gap:20px}#recordForm>.section-head{margin:0 -20px}#recordForm #contractInfo{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){#recordForm fieldset{padding:16px}#recordForm .field-grid,#recordForm #customerFields,#recordForm #contractInfo,#recordForm #saleFields,#recordForm #fileFields{grid-template-columns:1fr;gap:16px}#recordForm #saveRecord{width:100%}}

#recordDetail{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;padding:28px;align-items:stretch}#recordDetail .saved-section{border:1px solid #e1e9e3;border-radius:12px;padding:22px;background:white;min-width:0}#recordDetail .saved-wide{grid-column:1/-1}#recordDetail h3{font-size:16px;font-weight:600;color:#075b49;margin:0 0 20px}.saved-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 24px}.saved-field{min-width:0}.saved-field>span{display:block;font-size:13px;color:#61776b;margin-bottom:7px}.saved-field>strong{display:block;font-size:15px;font-weight:500;color:#073f35;overflow-wrap:anywhere;white-space:pre-wrap}.saved-financing .saved-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.saved-documents{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 24px}#recordDetail .saved-documents .document-slot{border:1px solid #e1e9e3;border-radius:8px;background:#f8faf8;padding:14px 16px;min-width:0}@media(max-width:850px){#recordDetail{grid-template-columns:1fr;padding:20px;gap:20px}.saved-financing .saved-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:540px){#recordDetail .saved-section{padding:16px}.saved-fields,.saved-financing .saved-fields,.saved-documents{grid-template-columns:1fr;gap:16px}}
/* Compact spacing for web entry forms. */
#recordForm{gap:18px;padding:0 22px 22px}
#recordForm>.section-head{margin:0 -22px}
#recordForm fieldset{padding:16px}
#recordForm #customerSection,#recordForm #equipmentFields{align-self:start}
#recordForm .field-grid,#recordForm #customerFields,#recordForm #fileFields,#recordForm #contractInfo,#recordForm #saleFields{gap:12px 18px}
#recordForm input,#recordForm select{height:44px;min-height:44px;padding:9px 12px;margin-top:6px}
#recordForm textarea{margin-top:6px}
#recordForm #fileFields label{padding:10px 12px}
#recordForm input[type=file]{height:auto;min-height:36px;padding:4px 0}
#recordForm #documentFields>p{margin-bottom:14px}
@media(max-width:540px){#recordForm{padding:0 16px 16px}#recordForm>.section-head{margin:0 -16px}#recordForm fieldset{padding:16px}}
#login h2{text-align:center}
#login>button{display:block;margin:20px auto 0;min-width:160px}

#recordForm #clientProvinceField{margin-top:12px}

#recordForm #customerFields #clientProvinceField{margin:0}

#detailAdvisor{margin-left:auto;color:white;font-size:13px;font-weight:400;text-align:right;overflow-wrap:anywhere}@media(max-width:540px){#detailAdvisor{font-size:12px}}

.document-tools{display:grid;gap:10px;margin-top:10px}.document-tools small{font-weight:400;overflow-wrap:anywhere}.document-tools button{justify-self:start;margin:0;font-size:13px}

#recordForm #fileFields .document-upload{padding:10px 12px;border:1px solid #e1e9e3;border-radius:8px;background:#f8faf8;min-width:0}#recordForm #fileFields .document-upload>label{padding:0;border:0;background:transparent}

.document-slot>details{grid-column:1/-1;min-width:0}.document-slot summary{cursor:pointer;color:#08775e;font-size:13px}.document-slot input[type=file]{max-width:100%;font-size:13px}

.saved-upload{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:12px}.saved-upload button{font-size:13px;margin:0;overflow-wrap:anywhere}.saved-upload button:first-child{background:transparent;color:#08775e;border:0;padding-left:0;text-align:left}

.document-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}.document-tools>input,.document-tools>select,.document-tools>small{grid-column:1/-1}.document-tools>small:empty{display:none}.document-tools>button{width:100%;justify-self:stretch;margin:0;min-height:42px;white-space:normal}.document-tools>button:last-child{grid-column:2;grid-row:3}.document-tools>button:nth-child(3){grid-column:1;grid-row:3}.saved-upload{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}.saved-upload>button{min-height:42px}@media(max-width:540px){.document-tools{grid-template-columns:1fr}.document-tools>button:last-child,.document-tools>button:nth-child(3){grid-column:1;grid-row:auto}.saved-upload{grid-template-columns:1fr}}

.document-tools>button:nth-child(3){grid-column:1;grid-row:3}.document-tools>button:nth-child(4){grid-column:2;grid-row:3}@media(max-width:540px){.document-tools>button:nth-child(3),.document-tools>button:nth-child(4){grid-column:1;grid-row:auto}}

body{min-height:100vh;display:flex;flex-direction:column}body>main{width:100%;flex:1;margin-top:0;margin-bottom:0}.enova-bottom-bar{height:8px;flex-shrink:0;background:linear-gradient(115deg,#acd90a,#02826b);width:100%}
body>main{padding-top:0}body>main>header{margin-left:calc(-1 * clamp(16px,2.2vw,40px));margin-right:calc(-1 * clamp(16px,2.2vw,40px));width:calc(100% + 2 * clamp(16px,2.2vw,40px))}

@media(max-width:600px){body>main>header{margin-left:-16px;margin-right:-16px;width:calc(100% + 32px)}}

.list-summary{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:8px 0 12px}.list-summary #recordCount{margin:0}.list-summary .pagination{margin:0;gap:8px;font-size:12px}.list-summary .pagination button{padding:6px 10px;font-size:12px;border-radius:7px;margin:0;min-height:30px}
#recordEditor,#recordDialog{margin-left:calc(-1 * clamp(16px,2.2vw,40px));margin-right:calc(-1 * clamp(16px,2.2vw,40px));width:calc(100% + 2 * clamp(16px,2.2vw,40px));min-height:calc(100vh - 130px)}
@media(max-width:600px){#recordEditor,#recordDialog{margin-left:-16px;margin-right:-16px;width:calc(100% + 32px)}}
#login label,#login input{text-align:center}

#recordForm #fileFields,.saved-documents{align-items:start}#recordForm #fileFields>.document-upload,.saved-documents>.document-slot{align-self:start}

/* Center the sign-in card in the space between the brand header and footer. */
body>main:has(>#login:not([hidden])){display:flex;flex-direction:column;padding-bottom:0}
body>main:has(>#login:not([hidden]))>header{flex-shrink:0}
body>main>#login:not([hidden]){width:min(100%,440px);flex-shrink:0;margin: auto; padding:24px}
body>main:has(>#login:not([hidden])){gap:24px;padding-bottom:24px}

/* Saved contacts use the same compact upload layout as the new-record forms. */
#recordDetail .saved-documents{gap:12px 18px;align-items:start}
#recordDetail .saved-documents .document-slot{padding:10px 12px;align-self:start;align-items:start}
.document-slot>.document-upload{grid-column:1/-1;min-width:0}
.document-slot .document-upload input[type=file]{height:auto;min-height:36px;padding:4px 0;margin-top:6px;width:100%}
.document-slot .document-upload .change-document{margin:0;font-size:13px;min-height:36px}
.document-slot .document-tools input,.document-slot .document-tools select{height:44px;min-height:44px;padding:9px 12px;margin-top:6px}

/* One tile style for creation forms and saved contact cards. */
#recordForm #fileFields>.document-upload,.saved-documents>.document-upload{display:block;align-self:start;padding:10px 12px;border:1px solid #e1e9e3;border-radius:8px;background:#f8faf8;min-width:0}
#recordForm #fileFields>.document-upload>label,.saved-documents>.document-upload>label{display:block;margin:0;padding:0;border:0;background:transparent;font-size:14px;font-weight:600;color:#073f35}
#recordForm #fileFields>.document-upload>input[type=file],.saved-documents>.document-upload>input[type=file]{width:100%;max-width:100%;height:auto;min-height:36px;padding:4px 0;margin-top:6px;font-size:13px}
.saved-documents .document-tools input,.saved-documents .document-tools select{height:44px;min-height:44px;padding:9px 12px;margin-top:6px}

#recordForm #fileFields,#recordDetail .saved-documents{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px;align-items:start}
#recordForm .document-upload,#recordDetail .document-upload{font-size:14px;font-weight:400;line-height:1.4}
#recordForm .document-upload .document-tools,#recordDetail .document-upload .document-tools{gap:12px;margin-top:10px}
#recordForm .document-upload .document-tools input,#recordForm .document-upload .document-tools select,#recordDetail .document-upload .document-tools input,#recordDetail .document-upload .document-tools select{font:inherit;height:44px;padding:9px 12px;margin:6px 0 0;width:100%}
@media(max-width:540px){#recordForm #fileFields,#recordDetail .saved-documents{grid-template-columns:1fr}}

/* Identical empty and saved document rows in both CRM views. */
#recordForm #fileFields>.document-upload>input[type=file],
#recordDetail .saved-documents>.document-upload>input[type=file]{height:42px;min-height:42px;margin:8px 0 0;padding:4px 0;border:0;border-radius:0;background:transparent;font:13px system-ui,sans-serif}
#recordForm .document-upload input[type=file]::file-selector-button,
#recordDetail .document-upload input[type=file]::file-selector-button{font:13px system-ui,sans-serif;height:34px;background:white;color:#08765e;border:1px solid #cddcd3;border-radius:6px;padding:8px 12px;margin-right:10px;cursor:pointer}
#recordForm .document-upload>.saved-upload,
#recordDetail .document-upload>.saved-upload{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;height:42px;min-height:42px;margin:8px 0 0}
#recordForm .document-upload>.saved-upload>button,
#recordDetail .document-upload>.saved-upload>button{height:34px;min-height:34px;margin:0;padding:8px 12px;font:13px system-ui,sans-serif;line-height:16px;border-radius:6px;white-space:nowrap}
#recordForm .document-upload>.saved-upload>button:first-child,
#recordDetail .document-upload>.saved-upload>button:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;padding-left:0}
#recordForm .document-upload>.saved-upload>button:last-child,
#recordDetail .document-upload>.saved-upload>button:last-child{background:white;color:#08765e;border:1px solid #cddcd3}

/* Independent document columns: expansion never leaves a gap in its neighbour. */
#recordForm #fileFields,#recordDetail .saved-documents{grid-auto-rows:1px;row-gap:0;column-gap:18px;align-items:start}

/* Upload tools float over the list without changing tile positions. */
#recordForm #fileFields,#recordDetail .saved-documents{overflow:visible}
#recordForm #fileFields>.document-upload,#recordDetail .saved-documents>.document-upload{position:relative;overflow:visible}
#recordForm #fileFields>.document-upload:has(>.document-tools:not([hidden])),#recordDetail .saved-documents>.document-upload:has(>.document-tools:not([hidden])){z-index:10;border-bottom-left-radius:0;border-bottom-right-radius:0}
#recordForm .document-upload>.document-tools,#recordDetail .document-upload>.document-tools{position:absolute;top:100%;left:-1px;right:-1px;margin:0;padding:12px;background:#f8faf8;border:1px solid #cddcd3;border-top:0;border-radius:0 0 8px 8px;box-shadow:0 12px 24px #073f3526;max-height:60vh;overflow-y:auto;z-index:11}
#recordForm .document-tools>.collapse-document,#recordDetail .document-tools>.collapse-document{grid-column:1/-1;grid-row:auto;min-height:30px;background:transparent;color:#08765e;border:0;padding:4px}
.document-upload>.resume-document{position:absolute;right:12px;top:38px;margin:0;height:34px;min-height:34px;padding:6px 10px;font-size:12px;z-index:2}

/* Native modal top layer prevents clipping by any contact/form container. */
.document-upload>.document-dialog{position:fixed;inset:0;margin:auto;width:min(520px,calc(100vw - 32px));max-width:520px;max-height:calc(100dvh - 32px);padding:24px;border:1px solid #dce8e1;border-radius:16px;background:white;overflow:auto;box-shadow:0 20px 70px #073f3540;color:#073f35}
.document-dialog::backdrop{background:#073f3566}
#recordForm .document-dialog h2,#recordDetail .document-dialog h2{font-size:19px;margin:0 0 20px}
#recordForm .document-dialog>.document-tools,#recordDetail .document-dialog>.document-tools{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0;padding:0;border:0;background:white;box-shadow:none;max-height:none;overflow:visible}
.document-dialog .document-tools>input,.document-dialog .document-tools>select,.document-dialog .document-tools>small{grid-column:1/-1;min-width:0}
.document-dialog .document-tools>small{overflow-wrap:anywhere;line-height:1.5}
#recordForm .document-dialog .collapse-document,#recordDetail .document-dialog .collapse-document{grid-column:1/-1;grid-row:auto}
#recordDetail .saved-section textarea{display:block;width:100%;font:inherit;border:1px solid #b7cfc4;border-radius:10px;padding:12px;resize:vertical;min-height:90px;margin-top:6px}
/* Customer details left, equipment and notes grouped on the right. */
#recordForm>.sale-top,#recordDetail>.sale-top{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:stretch;min-width:0}
.sale-top>.sale-right{display:flex;flex-direction:column;gap:18px;min-width:0}
#recordForm .sale-top>#customerSection{align-self:stretch}
#recordForm #salesNotesSection,#recordDetail .sale-notes{flex:1;min-width:0}
#recordDetail .sale-notes label{margin:0}
#recordDetail .sale-notes textarea,#recordForm #salesNotes{margin-top:0;min-height:90px}
#recordDetail .sale-notes h3{margin-bottom:12px}
@media(max-width:850px){#recordForm>.sale-top,#recordDetail>.sale-top{grid-template-columns:1fr}}
#recordDetail .sale-notes{display:flex;flex-direction:column;position:relative}
#recordDetail .sale-notes>label{display:flex;flex:1;min-height:90px}
#recordDetail .sale-notes textarea{flex:1;width:100%;height:100%;resize:vertical}
#recordDetail .sale-notes .notes-save-status{position:absolute;right:22px;top:22px;font-size:12px;max-width:65%;text-align:right}
#recordForm #salesNotesSection{display:flex;flex-direction:column}
#recordForm #salesNotes{flex:1;width:100%}

/* Match the form's border-integrated section captions on contact cards. */
#recordDetail fieldset.saved-section{margin:0;min-width:0;padding:16px;border:1px solid #e1ece5;border-radius:12px;background:#fff}
#recordDetail .saved-section>legend{font-size:16px;font-weight:600;color:#075b49;padding:0 8px;line-height:1.4}
#recordDetail .sale-notes .notes-save-status{top:0;right:16px;background:white;padding:0 4px}
#mapSection>.map-title-bar{margin:10px calc(-1 * clamp(16px,2.2vw,40px)) 18px;padding:12px 24px;background:linear-gradient(115deg,#acd90a,#02826b);color:white}
#mapSection>.map-title-bar h2{font-size:20px;font-weight:500;margin:0}
@media(max-width:600px){#mapSection>.map-title-bar{margin-left:-16px;margin-right:-16px}}
#mapSection{margin-top:10px}#mapSection>.map-title-bar{margin-top:0}

#installationsSection{margin-top:10px}#installationsSection>.map-title-bar{margin:0 calc(-1 * clamp(16px,2.2vw,40px)) 18px;padding:12px 24px;background:linear-gradient(115deg,#acd90a,#02826b);color:white}#installationsSection h2{font-size:20px;font-weight:500;margin:0}@media(max-width:600px){#installationsSection>.map-title-bar{margin-left:-16px;margin-right:-16px}}
.calendar-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:20px 0}.calendar-heading button{font-size:13px;padding:8px 12px}.installation-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin-bottom:24px}.calendar-weekday{padding:8px;text-align:center;font-size:13px}.calendar-day{min-height:110px;background:white;border:1px solid #dce8e1;border-radius:8px;padding:8px;min-width:0}.calendar-empty{background:#edf3ef}.calendar-event{display:block;width:100%;margin:6px 0 0;padding:6px;background:#e3f2e7;color:#075b49;border:0;text-align:left;font-size:12px;overflow-wrap:anywhere}.calendar-day>strong{font-size:13px}@media(max-width:650px){.installation-calendar{gap:3px}.calendar-day{padding:4px;min-height:85px}.calendar-event{font-size:10px;padding:3px}}

#equipmentFields label{position:relative}#equipmentFields .remove-equipment{position:absolute;right:0;top:-8px;width:32px;min-height:32px;padding:0;background:transparent;color:#08765e;border:0;font-size:22px}#equipmentFields .equipment-toolbar{margin-top:16px}#equipmentFields .equipment-toolbar select{width:100%;cursor:pointer}#equipmentFields [hidden]{display:none!important}

#equipmentFields label.equipment-item{display:grid;grid-template-columns:minmax(0,1fr) 44px;grid-template-rows:auto auto;align-items:center;gap:4px 10px;padding:12px;border:1px solid #dce8e1;border-radius:12px;min-width:0;align-self:start}#equipmentFields .equipment-name{grid-column:1;grid-row:1;min-width:0;overflow-wrap:anywhere}#equipmentFields label.equipment-item>input,#equipmentFields label.equipment-item>select{grid-column:1/-1;grid-row:2;width:100%;min-width:0;box-sizing:border-box;margin-top:0}#equipmentFields .remove-equipment{position:static;grid-column:2;grid-row:1;width:44px;height:44px;min-height:44px;flex-shrink:0;border-radius:8px;background:#edf4f0;line-height:1;justify-self:end}#equipmentFields .remove-equipment:hover{background:#dcebe2}

/* Compact equipment rows; controls remain inside their own row. */
#recordForm #equipmentFields .field-grid{grid-template-columns:minmax(0,1fr);gap:8px}
#recordForm #equipmentFields label.equipment-item{grid-template-columns:minmax(80px,1fr) minmax(90px,130px) 32px;grid-template-rows:auto;gap:8px;padding:8px 10px;border-radius:8px;background:#f8faf8}
#recordForm #equipmentFields .equipment-item .equipment-name{grid-column:1;grid-row:1;font-size:13px;font-weight:500}
#recordForm #equipmentFields label.equipment-item>input{grid-column:2;grid-row:1;min-height:36px;height:36px;padding:6px 9px;margin:0;background:#fff;font-size:14px}
#recordForm #equipmentFields .remove-equipment{grid-column:3;grid-row:1;width:32px;height:32px;min-height:32px;padding:0;font-size:18px;background:transparent;border-radius:6px}
#recordForm #equipmentFields .remove-equipment:hover{background:#e4eee7}
#recordForm #equipmentFields #pvMountingField{display:grid;grid-template-columns:minmax(80px,1fr) minmax(90px,130px) 32px;align-items:center;gap:8px;padding:0 10px 4px;font-size:13px}
#recordForm #equipmentFields #pvMounting{grid-column:2;min-height:36px;height:36px;margin:0;padding:6px 9px;font-size:14px}
#recordForm #equipmentFields .equipment-toolbar{margin-top:10px}
#recordForm #equipmentFields .equipment-toolbar select{min-height:36px;height:36px;padding:6px 10px;margin:0;font-size:13px;background:#fff}
@media(max-width:380px){#recordForm #equipmentFields label.equipment-item,#recordForm #equipmentFields #pvMountingField{grid-template-columns:minmax(0,1fr) 86px 32px;gap:6px;padding-left:8px;padding-right:8px}}

#recordForm #equipmentFields{width:100%;box-sizing:border-box;min-width:0;align-self:stretch}
#recordForm #equipmentFields .field-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));align-items:start;gap:10px 12px}
#equipmentFields .pv-equipment-group{display:flex;flex-direction:column;gap:8px;min-width:0}
#recordForm #equipmentFields label.equipment-item,#recordForm #equipmentFields #pvMountingField{grid-template-columns:minmax(0,1fr) minmax(72px,100px) 28px;gap:6px}
#recordForm #equipmentFields .remove-equipment{width:28px}
#recordForm #equipmentFields .pv-equipment-group>label{width:100%;box-sizing:border-box}

#recordForm #equipmentFields .pv-equipment-group{display:grid;grid-template-columns:minmax(0,1fr) 88px;align-items:center;gap:8px;padding:8px 10px;border:1px solid #dce8e1;border-radius:8px;background:#f8faf8}
#recordForm #equipmentFields .pv-equipment-group>label.equipment-item{padding:0;border:0;background:transparent;grid-template-columns:minmax(40px,1fr) minmax(60px,88px) 28px}
#recordForm #equipmentFields .pv-equipment-group>#pvMountingField{display:block;width:88px;padding:0;margin:0}
#recordForm #equipmentFields #pvMounting{width:100%;margin:0}
#recordForm #equipmentFields .field-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))}

/* Match equipment controls to the customer form and keep both columns aligned. */
#recordForm .sale-top{align-items:stretch}
#recordForm .sale-top>.sale-right{align-self:stretch;width:100%;box-sizing:border-box}
#recordForm .sale-top>#customerSection{height:100%;box-sizing:border-box}
#recordForm #equipmentFields label.equipment-item>input,
#recordForm #equipmentFields #pvMounting,
#recordForm #equipmentFields .equipment-toolbar select{height:44px;min-height:44px;padding:9px 12px;border-radius:10px;font-size:14px;box-sizing:border-box}
#recordForm #equipmentFields label.equipment-item,
#recordForm #equipmentFields .pv-equipment-group{min-height:62px;box-sizing:border-box}
#recordForm #equipmentFields .pv-equipment-group>label.equipment-item{min-height:44px}
#recordForm #salesNotesSection{box-sizing:border-box;margin-bottom:0}
@media(max-width:850px){#recordForm .sale-top>#customerSection{height:auto}}

#recordDetail .installation-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid #e1ece5;margin-top:16px;padding-top:12px;min-height:40px;box-sizing:border-box;font-size:14px}
#recordDetail .installation-summary>span{color:#61776b}
#recordDetail .installation-summary>strong{font-weight:500;color:#073f35;white-space:nowrap}

.calendar-day{height:174px;min-height:174px;box-sizing:border-box;overflow:hidden}
.calendar-date,.calendar-more{background:transparent;color:#075b49;border:0;margin:0;padding:3px 4px;font-size:13px;text-align:left}
.calendar-date{font-weight:600;width:100%}
.calendar-event{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:30px;box-sizing:border-box}
.calendar-more{margin-top:4px;font-size:12px}
dialog.installation-day-dialog{width:calc(100% - 32px);max-width:620px;max-height:80vh;padding:22px;border:1px solid #dce8e1;border-radius:16px}
.installation-day-dialog .calendar-heading{margin:0 0 18px}
.installation-day-dialog h2{font-size:18px}
.installation-day-entry{display:flex;align-items:center;gap:16px;width:100%;margin:8px 0;padding:12px;background:#f1f7f3;color:#075b49;text-align:left;font-size:14px}
.installation-day-entry strong{min-width:90px;font-size:13px}.installation-day-entry span{overflow-wrap:anywhere}

/* Compact owner directory */
#owner{margin:0}
#accounts{display:block;overflow:auto;background:white;border:1px solid #dce9e3;border-radius:12px}
.accounts-table{border-collapse:collapse;width:100%;min-width:740px;text-align:left;font-size:14px}
.accounts-table th{background:#f6faf8;color:#49645b;font-size:12px;font-weight:600}
.accounts-table th,.accounts-table td{padding:12px 16px;border-bottom:1px solid #e5eee9;vertical-align:middle}
.accounts-table tbody tr:last-child td{border-bottom:0}
.accounts-table td strong,.accounts-table td small{display:block}
.accounts-table td small{margin-top:3px;color:#72867c;font-size:12px}
.access-badge{padding:4px 10px;background:#e4f6e8;color:#167744;border-radius:20px;font-size:12px;white-space:nowrap}
.access-badge.blocked{background:#edf0f1;color:#63716c}
.accounts-table .account-edit{margin:0;padding:4px;width:32px;height:32px;background:transparent;color:#02826b;border:0;font-size:22px}
.account-filters{display:flex;align-items:end;gap:16px;margin:20px 0}
.account-filters label{flex:1;margin:0}.account-filters label:first-child{flex:2}.account-filters input,.account-filters select{margin-bottom:0}
#accountCount{font-size:13px;white-space:nowrap;align-self:center}
.account-tabs{display:flex;gap:16px;border-bottom:1px solid #dce9e3;margin-top:20px}
.account-tabs button{background:transparent;color:#617a70;border-radius:0;border-bottom:2px solid transparent;padding:12px 16px;margin:0}
.account-tabs button[aria-pressed=true]{color:#02826b;border-bottom-color:#02826b}
#headerActions #newAccount{width:140px;height:42px;box-sizing:border-box;padding:10px 12px;font:400 14px system-ui,sans-serif;white-space:nowrap}
#accountDialog{max-width:660px}#account{display:grid;grid-template-columns:1fr 1fr;gap:14px 20px}#account h3{grid-column:1/-1}#account label{margin:0}#account input,#account select{margin-bottom:0}
@media(max-width:760px){.account-filters{flex-wrap:wrap}.account-filters label{min-width:150px}#account{grid-template-columns:1fr}#accountCount{width:100%}}

body>main>#login:not([hidden]){box-sizing:border-box;width:min(calc(100% - 32px),440px);padding:28px;margin:auto;align-self:center}
#login label,#login input{display:block;width:100%;box-sizing:border-box}
#login label{margin:0 0 20px}#login input{margin:8px 0 0}#login>button{margin:24px auto 0}
/* Equal header controls; width follows the label. */
#headerActions button,#headerActions #logout,#headerActions #closeDetail,#headerActions #cancelRecord,#headerActions #newAccount,#headerActions #showAccounts{width:auto;min-width:0;height:42px;box-sizing:border-box;padding:10px 14px;font:400 14px system-ui,sans-serif;border-radius:10px;white-space:nowrap;flex-shrink:0}

.structure-tree,.structure-children{list-style:none;margin:0;padding:0}
.structure-tree{padding:12px 16px}
.structure-children{margin-left:26px;padding-left:18px;border-left:1px solid #cfe2d8}
.structure-row{display:flex;align-items:center;gap:16px;min-height:68px;border-bottom:1px solid #e5eee9}
.structure-toggle,.structure-leaf{display:flex;align-items:center;gap:14px;flex:1;min-width:0;text-align:left;padding:12px 8px;background:transparent;color:#073f35;border:0;margin:0}
.structure-toggle:hover{background:#f0f7f3}.structure-leaf{padding-left:32px}
.structure-person{display:flex;flex-direction:column;gap:4px}.structure-person strong{font-size:14px}.structure-person small,.structure-toggle>small{font-size:12px;color:#63796e}
.structure-toggle>small{margin-left:auto}
.structure-row .account-edit{background:transparent;color:#02826b;margin:0;padding:6px;font-size:20px}
.structure-empty{padding:8px 24px;color:#63796e;font-size:14px}
@media(max-width:600px){.structure-row{gap:8px}.structure-toggle{flex-wrap:wrap}.structure-toggle>small{margin-left:26px}.structure-children{margin-left:10px;padding-left:10px}}

#owner{margin-top:10px}
#owner>.map-title-bar{margin:0 calc(-1 * clamp(16px,2.2vw,40px)) 18px;padding:12px 24px;background:linear-gradient(115deg,#acd90a,#02826b);color:white}
#owner>.map-title-bar h2{font-size:20px;font-weight:500;margin:0}
.structure-group>h3{margin:0;padding:16px 24px 4px;font-size:13px;font-weight:600;color:#617a70}
.structure-group+.structure-group{border-top:1px solid #e5eee9}
@media(max-width:600px){#owner>.map-title-bar{margin-left:-16px;margin-right:-16px}}

#installationRecords>.calendar-heading{flex-wrap:nowrap}#installationRecords>.calendar-heading h3{margin:0}.calendar-controls{display:flex;align-items:center;gap:8px}.calendar-controls button{margin:0}@media(max-width:480px){.calendar-controls{gap:4px}.calendar-controls button{padding:8px 6px;font-size:12px}#installationRecords>.calendar-heading h3{font-size:15px}}

#accounts{max-height:calc(100dvh - 320px);overflow:auto}
.structure-row{min-height:44px;gap:10px}.structure-toggle,.structure-leaf{padding-top:7px;padding-bottom:7px}
.structure-person{flex-direction:row;align-items:baseline;gap:12px;min-width:0;flex-wrap:wrap}
.structure-person strong{font-size:13px}.structure-person small{font-size:12px}
.structure-children{margin-left:16px;padding-left:12px}.structure-tree{padding:6px 14px}.structure-group>h3{padding:12px 22px 2px}
#account .send-access{grid-column:1/-1;display:flex;align-items:center;gap:10px;margin:4px 0}
#account .send-access input{width:18px;height:18px;margin:0;flex:none}
#accountError{grid-column:1/-1;color:#a33333;margin:0}#accountError:empty{display:none}
.account-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:6px}
.account-actions button{margin:0;width:100%;height:42px;padding:10px 14px}
#closeAccount{background:#edf5f1;color:#027761}
@media(max-width:600px){#accounts{max-height:65dvh}.structure-person{gap:3px;flex-direction:column}}
#accountDialog{padding:24px}
#accountDialog #account{margin:0;padding:0;row-gap:14px}
#accountDialog #accountTitle{text-align:center;margin:0 0 4px;padding:0;font-size:20px;line-height:1.3}
@media(max-width:600px){#accountDialog{padding:20px}}

#setPassword{box-sizing:border-box;width:min(calc(100% - 32px),440px);margin:40px auto;padding:28px}
#setPassword h2{text-align:center;font-size:20px;margin:0 0 24px}
#setPassword label{display:block;margin:0 0 18px}#setPassword input{box-sizing:border-box;width:100%;margin-top:8px}
#setPassword button{display:block;width:100%;margin-top:12px}#accessCancel{background:#edf5f1;color:#027761}#accessError{color:#a33333}

#securityAlerts{border:1px solid #e7d2a4;background:#fffaf0;border-radius:12px;padding:14px 18px;margin-bottom:16px}#securityAlerts summary{cursor:pointer;font-weight:600}.security-alert-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-top:1px solid #eadfc7}.security-alert-row p{margin:4px 0}.security-alert-row small{color:#617a70}.security-alert-row button{white-space:nowrap;margin:0}

.contact-view-history{max-height:260px;overflow:auto;font-size:13px}.contact-view-history p{border-top:1px solid #eadfc7;padding:8px 0;margin:0}#securityAlerts details+details{margin-top:12px}

/* Mobile browser presentation. Desktop and packaged native assets stay unchanged. */
.web-mobile-menu,.web-mobile-tabs{display:none}
@media(max-width:600px){
 html:root{background:#02826b url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22100%25%22%20height%3D%22100%25%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22t%22%3E%3Cstop%20offset%3D%220.0%22%20stop-color%3D%22%23acd90a%22%2F%3E%3Cstop%20offset%3D%220.125%22%20stop-color%3D%22%23add908%22%2F%3E%3Cstop%20offset%3D%220.25%22%20stop-color%3D%22%23abd708%22%2F%3E%3Cstop%20offset%3D%220.375%22%20stop-color%3D%22%2390cb1b%22%2F%3E%3Cstop%20offset%3D%220.5%22%20stop-color%3D%22%2378be2a%22%2F%3E%3Cstop%20offset%3D%220.625%22%20stop-color%3D%22%235aae3e%22%2F%3E%3Cstop%20offset%3D%220.75%22%20stop-color%3D%22%233da350%22%2F%3E%3Cstop%20offset%3D%220.875%22%20stop-color%3D%22%231b965d%22%2F%3E%3Cstop%20offset%3D%221.0%22%20stop-color%3D%22%230a8d65%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22b%22%3E%3Cstop%20offset%3D%220.0%22%20stop-color%3D%22%2397cf16%22%2F%3E%3Cstop%20offset%3D%220.125%22%20stop-color%3D%22%237cc325%22%2F%3E%3Cstop%20offset%3D%220.25%22%20stop-color%3D%22%2362b438%22%2F%3E%3Cstop%20offset%3D%220.375%22%20stop-color%3D%22%2348a847%22%2F%3E%3Cstop%20offset%3D%220.5%22%20stop-color%3D%22%232a9e53%22%2F%3E%3Cstop%20offset%3D%220.625%22%20stop-color%3D%22%23069263%22%2F%3E%3Cstop%20offset%3D%220.75%22%20stop-color%3D%22%2303846e%22%2F%3E%3Cstop%20offset%3D%220.875%22%20stop-color%3D%22%2304836e%22%2F%3E%3Cstop%20offset%3D%221.0%22%20stop-color%3D%22%2302826b%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22fade%22%20x2%3D%220%22%20y2%3D%221%22%3E%3Cstop%20stop-color%3D%22white%22%20stop-opacity%3D%220%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22white%22%2F%3E%3C%2FlinearGradient%3E%3Cmask%20id%3D%22m%22%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url%28%23fade%29%22%2F%3E%3C%2Fmask%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url%28%23t%29%22%2F%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url%28%23b%29%22%20mask%3D%22url%28%23m%29%22%2F%3E%3C%2Fsvg%3E") center / 100% 100% no-repeat fixed;min-height:100%;}
 body{background:transparent;min-height:100dvh;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
 body>main{padding:0 20px 28px;min-width:0}
 body>main>header{background:transparent;margin:0;width:100%;padding:24px 0 16px;gap:12px;align-items:center;position:relative}
 header .brand-logo{transform:none;width:270px;max-width:100%;height:48px;margin:0;justify-content:center;gap:10px}
 header .brand-logo .brand-wordmark{width:187px;height:38px}
 header .brand-wordmark img{width:366px;height:204px;left:-83px;top:-70px}
 header .brand-logo .brand-go{width:72px;height:46px;font-size:28px;font-weight:400}
 .enova-bottom-bar{display:none}
 .web-mobile-menu{display:block;background:#ffffff25;color:white;border:1px solid #ffffff60;border-radius:12px;min-height:44px;width:100%;margin:4px 0 0;padding:10px 16px;font-size:16px;text-align:center}
 body.web-mobile-ready #headerActions{display:none;width:100%;margin:0;grid-template-columns:1fr 1fr;gap:8px;background:#fff;border-radius:18px;padding:12px;box-sizing:border-box}
 body.web-menu-open #headerActions:not([hidden]){display:grid}
 body.web-mobile-ready #headerActions button{width:100%;height:auto;min-height:44px;border:0;background:#eef7e4;color:#087c64;white-space:normal}
 body.web-mobile-ready #headerActions #logout{background:transparent;color:#087c64}
 #login{width:100%;max-width:440px;padding:24px;border:0;border-radius:22px;box-sizing:border-box;margin:clamp(28px,12dvh,110px) auto 32px}
 #login input{min-height:48px;background:#f7faf8;font-size:16px}#login button{width:100%;min-height:48px;border-radius:12px;margin-top:8px}
 #panel #crm,#panel #owner,#panel #mapSection,#panel #installationsSection,#panel #recordEditor,#panel #recordDialog{width:100%;margin:0;min-height:0;background:transparent;border-radius:0;overflow:visible}
 .web-mobile-tabs{display:grid;grid-template-columns:1fr 1fr;padding:4px;background:#ffffff30;border-radius:12px;gap:4px;margin-bottom:14px}
 .web-mobile-tabs button{margin:0;min-height:44px;border:0;background:transparent;color:white;border-radius:9px;font-size:16px}
 .web-mobile-tabs button[aria-pressed=true]{background:white;color:#087c64}
 .web-mobile-ready #crm>.crm-tools>label:first-child{display:none}
 .crm-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
 .crm-tools label{min-width:0;margin:0;color:white;font-size:13px}.crm-tools label:nth-child(2){grid-column:1/-1}
 .crm-tools input,.crm-tools select{font-size:16px;min-height:44px;margin:5px 0 0;background:white}
 .crm-tools button{min-height:44px;margin:0;background:#ffffff25;color:white;border:1px solid #ffffff60}
 .list-summary{color:white;font-size:13px;margin:16px 0 10px}.list-summary .pagination{gap:6px}.list-summary .pagination button{min-height:36px;background:#ffffffdd;color:#087c64;padding:6px 8px}
 .contact-table{overflow:visible;max-height:none!important;padding:0}.record-head{display:none}
 #crm .record-row,#crm.client-list .record-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;min-width:0;width:100%;height:auto;min-height:96px;padding:16px 18px;margin:0 0 12px;border:0;border-radius:20px;background:#fff;align-items:center}
 #crm .record-row .contact-name{grid-column:1/-1;font-size:18px;line-height:1.3;display:block;padding:0 24px 4px 0;position:relative;color:#087c64;overflow-wrap:anywhere;min-height:32px}
 .contact-name::after{content:'›';position:absolute;right:0;top:0;color:#89aaa0;font-size:26px;font-weight:400}
 #crm .record-row>span{text-align:left;font-size:12px;min-width:0;overflow-wrap:anywhere}
 #crm .record-row .signed-date{display:none}#crm .record-row .seller{grid-column:1/-1;display:block;font-size:13px;color:#6f8179}
 #crm .record-row .contact-product{grid-column:2;grid-row:2;text-align:right;color:#087c64}
 #crm .record-row .contact-status{grid-column:1;grid-row:2;color:#6f8179}
 #recordDialog>.section-head,#recordEditor>.section-head,#mapSection>.map-title-bar,#installationsSection>.map-title-bar,#owner>.map-title-bar{background:transparent;color:white;padding:8px 0 20px;margin:0;width:100%;text-align:center;justify-content:center}
 #recordDialog #detailTitle{font-size:22px;line-height:1.3}#recordDetail{padding:0;display:flex;flex-direction:column;gap:16px}
 #recordForm{padding:0;margin:0;border:0;background:transparent;display:block}
 #recordForm>.sale-top,#recordDetail>.sale-top,.sale-top>.sale-right{display:flex;flex-direction:column;gap:16px;width:100%;min-width:0}
 #recordForm fieldset,#recordDetail .saved-section{box-sizing:border-box;width:100%;min-width:0;padding:20px 18px;margin:0 0 16px;border:0;border-radius:20px;background:white;height:auto;align-self:auto}
 #recordDetail .saved-section{margin:0}#recordForm legend,#recordDetail legend{float:left;display:block;width:100%;padding:0;margin:0 0 16px;color:#087c64;font-size:17px;font-weight:600}
 #recordForm legend+*,#recordDetail legend+*{clear:both}
 #recordForm .field-grid,#recordForm #customerFields,#recordForm #contractInfo{display:grid;grid-template-columns:1fr;gap:12px}
 #recordForm #contractInfo legend{grid-column:1/-1}
 #recordForm label{min-width:0;font-size:14px;margin:0}#recordForm input:not([type=file]),#recordForm select{font-size:16px;min-height:44px;height:auto;padding:10px;margin-top:6px;box-sizing:border-box}
 #recordForm textarea{font-size:16px;min-height:100px}
 #recordForm #equipmentFields .field-grid{grid-template-columns:1fr;gap:10px}
 #recordForm #equipmentFields .pv-equipment-group{grid-template-columns:minmax(0,1fr) 82px;padding:8px;gap:6px}
 #recordForm #equipmentFields .pv-equipment-group>label.equipment-item{grid-template-columns:minmax(32px,1fr) 64px 28px;gap:4px}
 #recordForm #equipmentFields .equipment-item input{width:100%;min-width:0}
 #recordForm #equipmentFields .equipment-add{width:100%;max-width:none}
 #recordForm #saveRecord{width:100%;min-height:48px;margin:16px 0;background:white;color:#087c64;border:0;border-radius:14px}
 #recordDetail .saved-fields,#recordDetail .saved-financing .saved-fields{display:flex;flex-direction:column;gap:14px}
 #recordDetail .saved-field{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:14px;align-items:start}
 #recordDetail .saved-field>span{font-size:15px;margin:0;color:#182b25}#recordDetail .saved-field>strong{font-size:15px;text-align:right;color:#7d8580;font-weight:400;overflow-wrap:anywhere}
 #recordForm #fileFields,#recordDetail .saved-documents{display:flex;flex-direction:column;gap:12px}
 #recordForm .document-upload,#recordDetail .document-upload{width:100%;box-sizing:border-box;min-width:0}
 .document-upload>.document-dialog{width:calc(100vw - 32px);max-height:calc(100dvh - 32px);box-sizing:border-box;padding:20px}
 #contactMap{height:60dvh;min-height:280px;border-radius:20px}
 #installationRecords{background:white;padding:14px;border-radius:20px;box-sizing:border-box;min-width:0}
 .calendar-heading{gap:6px;flex-wrap:wrap!important}.calendar-controls button{min-height:40px}
 #accounts{background:white;border-radius:20px;max-height:none}.account-filters{color:white}.account-filters label{min-width:0;flex:1 1 130px}
 dialog{box-sizing:border-box;width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:20px}
 #message{border-radius:14px;font-size:14px}
}
.web-mobile-back{display:none}
@media(max-width:600px){
 body>main>header .brand-logo{align-self:center!important}
 .web-mobile-back{display:block;align-self:flex-start;background:#ffffff25;color:white;border:1px solid #ffffff60;border-radius:12px;min-height:44px;margin:4px 0 0;padding:10px 18px;font-size:16px}
 #recordDialog>.section-head{flex-direction:column;align-items:center;gap:6px}#recordDialog>.section-head small{font-size:12px}
 #recordDetail fieldset.saved-section{border-radius:20px!important}
}
@media(max-width:600px){
 #recordDetail .sale-notes,#recordForm #salesNotesSection{display:block;min-height:0}
 #recordDetail .sale-notes .notes-save-status{position:static;display:block;max-width:none;text-align:right;margin-top:8px;padding:0;font-size:12px}
 #recordDetail .saved-section>legend{padding:0;font-size:17px}
}
@media(max-width:600px){
 body>main>header{flex-direction:column;flex-wrap:nowrap;align-items:center}
 body>main>header .brand-logo{margin-inline:auto;flex-shrink:0}
 #recordForm>.section-head{background:transparent;color:white;margin:0;padding:4px 0 18px;text-align:center;justify-content:center;width:100%}
 #recordForm>.section-head h2{font-size:21px;margin:0}
}

/* iPhone CRM presentation: only the mobile browser shell uses these overrides. */
.mobile-native-nav,.mobile-native-home,.mobile-contact-meta,.mobile-missing,.mobile-list-caption,.mobile-sync-caption,.mobile-customer-heading,.mobile-advisor{display:none}
@media(max-width:600px){
 body.web-mobile-ready{font-family:-apple-system,BlinkMacSystemFont,system-ui,sans-serif}
 body.web-mobile-ready>main{padding:0 28px 24px}
 .web-mobile-ready.mobile-signed-in:not(.mobile-home-main)>main>header{display:none}
 .web-mobile-ready #headerActions{display:none!important}
 .mobile-signed-in .mobile-native-nav{display:flex;align-items:center;justify-content:space-between;position:relative;height:76px;margin:0 -12px 22px;padding:12px 0;gap:8px;color:#fff}
 .mobile-native-nav>button{display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;border-radius:50%;padding:0;margin:0;background:#ffffff20;border:1px solid #ffffff35;color:#fff;font-size:36px;font-weight:300}
 .mobile-native-nav>strong{position:absolute;left:50%;transform:translateX(-50%);font-size:17px;font-weight:600;text-align:center;white-space:nowrap;pointer-events:none}
 .mobile-native-nav:has(.mobile-native-actions:not([hidden]))>strong{left:46%}
 .mobile-native-actions{display:flex;align-items:center;border-radius:26px;background:#ffffff25;padding:0 7px;gap:0;height:44px}
 .mobile-native-actions button{display:flex;align-items:center;justify-content:center;background:none;border:0;color:#02826b;font-size:17px;padding:6px;margin:0;min-height:44px}
 .web-mobile-ready #message:empty{display:none}
 .web-mobile-ready .web-mobile-tabs{height:32px;border-radius:9px;padding:2px;gap:0;margin:0 0 18px;background:#ffffff10}
 .web-mobile-ready .web-mobile-tabs button{height:28px;min-height:28px;padding:2px 6px;color:#111;font-size:13px;border-radius:8px}
 .web-mobile-ready .web-mobile-tabs button[aria-pressed=true]{color:#111;font-weight:600;box-shadow:0 1px 4px #0001}
 .web-mobile-ready #crm>.crm-tools{gap:12px;grid-template-columns:minmax(0,1fr) auto}
 .web-mobile-ready #crm>.crm-tools>label{font-size:0}
 .web-mobile-ready #crm>.crm-tools>label:nth-child(2){position:relative}
 .web-mobile-ready #crm>.crm-tools>label:nth-child(2)::before{content:'';position:absolute;left:18px;top:18px;width:12px;height:12px;border:1.6px solid #02826b;border-radius:50%;z-index:1}
 .web-mobile-ready #crm>.crm-tools>label:nth-child(2)::after{content:'';position:absolute;left:30px;top:31px;width:7px;height:1.6px;background:#02826b;transform:rotate(45deg)}
 .web-mobile-ready #search{height:52px;min-height:52px;margin:0;border:0;border-radius:16px;padding:16px 14px 16px 44px;font-size:14px}
 .web-mobile-ready #search::placeholder{color:#b5b8b7}
 .web-mobile-ready #recordSort{background:transparent;color:white;border:0;font-size:12px;font-weight:500;padding:0 20px;min-height:26px;height:26px;margin:0;appearance:none;background-image:linear-gradient(white,white),linear-gradient(white,white),linear-gradient(white,white);background-size:11px 1px,8px 1px,5px 1px;background-position:0 9px,0 12px,0 15px;background-repeat:no-repeat}
 .web-mobile-ready #recordSort option{color:#073f35;background:white}
 .web-mobile-ready #direction{font-size:12px;font-weight:500;background:transparent;border:0;padding:0;min-height:26px;height:26px}
 .web-mobile-ready #crm .list-summary{margin:12px 0 18px;display:flex;flex-wrap:nowrap;color:white;font-size:14px}
 .web-mobile-ready .mobile-list-caption{display:block}
 .web-mobile-ready #recordCount{font-size:14px}
 .web-mobile-ready #recordCount::after{content:none}
 .web-mobile-ready #crm .pagination{display:none}
 .web-mobile-ready #crm .record-row,.web-mobile-ready #crm.client-list .record-row{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:4px;min-height:64px;padding:12px 32px 12px 14px;margin:0 0 8px;border-radius:14px}
 .web-mobile-ready #crm .record-row .contact-name{font-size:14px;line-height:18px;padding:0;min-height:18px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:static;text-align:left;margin:0;border:0;border-radius:0;background:none}
 .web-mobile-ready #crm .record-row .contact-name::after{right:14px;top:50%;transform:translateY(-50%);font-size:23px;color:#02826b}
 .web-mobile-ready #crm .record-row .contact-name::before{content:'';position:absolute;inset:0}
 .web-mobile-ready #crm .record-row>.seller,.web-mobile-ready #crm .record-row>.contact-status,.web-mobile-ready #crm .record-row>.contact-product{display:none}
 .web-mobile-ready #crm .record-row>.mobile-contact-meta{display:flex;justify-content:space-between;gap:8px;color:#929292;font-size:12px;line-height:16px}
 .web-mobile-ready .mobile-missing{display:inline;margin-left:7px;color:#e9953f;font-size:12px;font-weight:400}
 .web-mobile-ready .mobile-sync-caption{display:block;font-size:12px;color:#ffffffcc;text-align:center;margin:20px 0 0}
 .web-mobile-ready #recordDialog>.section-head,.web-mobile-ready #recordForm>.section-head,.web-mobile-ready #mapSection>.map-title-bar,.web-mobile-ready #installationsSection>.map-title-bar,.web-mobile-ready #owner>.map-title-bar{display:none}
 .web-mobile-ready #recordDetail{gap:18px}
 .web-mobile-ready #recordDetail>.sale-top,.web-mobile-ready #recordDetail .sale-right{gap:18px}
 .web-mobile-ready #recordDetail .saved-section{padding:20px;border-radius:20px}
 .web-mobile-ready #recordDetail .saved-fields{gap:12px}
 .web-mobile-ready #recordDetail .saved-field>span,.web-mobile-ready #recordDetail .saved-field>strong{font-size:15px}
 .web-mobile-ready #recordDetail .sale-top>.saved-section>legend,.web-mobile-ready #recordDetail>.saved-section:first-child>legend,.web-mobile-ready #recordDetail .sale-top>.saved-section .saved-field:first-child,.web-mobile-ready #recordDetail>.saved-section:first-child .saved-field:first-child{display:none}
 .web-mobile-ready .mobile-customer-heading{display:block;color:#02826b;font-size:22px;font-weight:600;margin:0 0 16px}
 .web-mobile-ready #recordDetail .mobile-advisor{display:grid}
 .web-mobile-ready #recordForm>.sale-top,.web-mobile-ready #recordForm .sale-right{gap:14px}
 .web-mobile-ready #recordForm #customerSection,.web-mobile-ready #recordForm #contractInfo{display:contents}
 .web-mobile-ready #customerSection>legend,.web-mobile-ready #contractInfo>legend{display:none}
 .web-mobile-ready #recordForm #customerFields{gap:14px;margin-bottom:0}
 .web-mobile-ready #recordForm #customerFields>label,.web-mobile-ready #recordForm #contractInfo>label{display:block;background:#fff;border-radius:20px;padding:20px;font-size:12px;color:#02826b;margin:0}
 .web-mobile-ready #recordForm #contractInfo>label{margin:14px 0}
 .web-mobile-ready #recordForm #contractNumberField{order:-1}
 .web-mobile-ready #recordForm #customerFields input,.web-mobile-ready #recordForm #customerFields select,.web-mobile-ready #recordForm #contractInfo input{border:0;background:transparent;padding:0;margin-top:6px;height:22px;min-height:22px;border-radius:0;font-size:17px;color:#151515;box-shadow:none}
 .web-mobile-ready #recordForm #clientProvince{color:#02826b}
 .web-mobile-ready #recordForm #equipmentFields,.web-mobile-ready #recordForm #salesNotesSection{margin:0;padding:20px}
 .web-mobile-ready #recordForm #equipmentFields .equipment-add{background:#eafaad;color:#02826b;border:0;border-radius:12px;min-height:44px;font-size:15px;text-align:center}
 .web-mobile-ready #recordForm #salesNotes{border:0;background:white;padding:0;min-height:100px}
 .web-mobile-ready #recordForm #documentFields{background:transparent;border:0;padding:0;margin-top:28px}
 .web-mobile-ready #documentFields>legend{color:white;font-size:20px}
 .web-mobile-ready #documentFields>p{color:white;font-size:12px}
 .web-mobile-ready #recordForm #saveRecord{background:#02826b;color:white;font-size:17px;font-weight:600;border-radius:18px;min-height:54px}
 .web-mobile-ready .mobile-native-home:not([hidden]){display:flex;flex-direction:column;min-height:65dvh;justify-content:center}
 .mobile-native-home h2{color:white;text-align:center;font-size:18px;font-weight:500;margin:0 0 20px}
 .mobile-native-home>div{display:flex;flex-direction:column;gap:14px}
 .mobile-native-home button{border:0;background:white;color:#02826b;min-height:88px;text-align:left;padding:20px 24px;border-radius:20px;font-size:21px;font-weight:600;margin:0}
 .mobile-native-home button:not(.mobile-home-logout)::after{content:'›';float:right;color:#7aaa9c}
 .mobile-native-home .mobile-home-logout{margin-top:30px;min-height:44px;text-align:center;background:transparent;color:white;font-size:16px;font-weight:400}
 .mobile-home-open #panel{display:none}.mobile-home-main .mobile-native-nav{display:none}
}
.mobile-installation,#mobileInstallationDay{display:none}
@media(max-width:600px){
 .web-mobile-ready #recordDetail .mobile-installation{display:block}
 .web-mobile-ready #recordDetail .saved-equipment>.installation-summary,.web-mobile-ready #recordDetail .saved-equipment>button{display:none}
 .web-mobile-ready #recordDetail .sale-notes textarea{border:0;box-shadow:none;padding:0;background:#fff;min-height:110px}
 .web-mobile-ready #recordDetail .document-upload{border:0;border-radius:0;background:white;padding:12px 0;min-height:54px}
 .web-mobile-ready #recordDetail .document-upload+.document-upload{border-top:1px solid #eee}
 .web-mobile-ready #recordForm .document-upload{padding:20px;border:0;border-radius:20px;background:white;min-height:70px}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>label{display:flex;align-items:center;justify-content:space-between;gap:14px;font-size:15px;font-weight:500;margin:0;color:#02826b;min-height:32px;cursor:pointer}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload:has(>input[type=file]:not([hidden]))>label::after{content:'+ Dodaj plik';font-size:13px;font-weight:400;color:#02826b;white-space:nowrap}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>input[type=file]{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;opacity:0;overflow:hidden;padding:0!important;margin:0!important}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload:focus-within{outline:2px solid #99c941;outline-offset:2px}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>.saved-upload{display:grid;grid-template-columns:minmax(0,1fr) 36px;gap:8px;min-height:36px}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>.saved-upload>button:first-child{font-size:12px;padding:4px 0;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;border:0;background:transparent;color:#02826b;min-height:36px}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>.saved-upload>button:last-child{font-size:0;width:36px;min-height:36px;padding:0;border:0;background:transparent;color:#02826b;margin:0}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>.saved-upload>button:last-child::after{content:'↻';font-size:24px}
 .web-mobile-ready #installationRecords{padding:16px 12px;border-radius:20px}
 .web-mobile-ready #installationRecords .calendar-heading{position:relative;margin:0 0 8px;height:44px;justify-content:center}
 .web-mobile-ready #installationRecords .calendar-heading h3{font-size:15px;font-weight:600;color:#02826b;margin:0}
 .web-mobile-ready #installationRecords .calendar-controls{position:absolute;inset:0;display:flex;justify-content:space-between;pointer-events:none}
 .web-mobile-ready #installationRecords .calendar-controls button{pointer-events:auto;width:36px;height:44px;margin:0;border:0;background:transparent;color:#02826b;font-size:0;padding:0}
 .web-mobile-ready #installationRecords .calendar-controls button:first-child::after{content:'‹';font-size:26px}
 .web-mobile-ready #installationRecords .calendar-controls button:last-child::after{content:'›';font-size:26px}
 .web-mobile-ready #installationRecords .calendar-controls button:nth-child(2){display:none}
 .web-mobile-ready .installation-calendar{gap:4px 2px;margin:0}
 .web-mobile-ready .calendar-weekday{font-size:11px;font-weight:400;color:#888;padding:4px 0}
 .web-mobile-ready .calendar-day{position:relative;background:transparent;border:0;padding:0;height:44px;min-height:44px;border-radius:10px}
 .web-mobile-ready .calendar-date{border:0;background:transparent;width:100%;height:44px;margin:0;padding:0 0 7px;color:#073f35;font-size:15px}
 .web-mobile-ready .calendar-day[data-count]:not([data-count='0'])::after{content:'';position:absolute;bottom:5px;left:calc(50% - 2.5px);width:5px;height:5px;border-radius:50%;background:#02826b;pointer-events:none}
 .web-mobile-ready .calendar-event,.web-mobile-ready .calendar-more{display:none}
 .web-mobile-ready .mobile-day-selected{background:#02826b}.web-mobile-ready .mobile-day-selected .calendar-date{color:white}
 .web-mobile-ready .mobile-day-selected[data-count]:not([data-count='0'])::after{background:white}
 .web-mobile-ready #mobileInstallationDay{display:block;color:white;margin-top:18px}
 .web-mobile-ready #mobileInstallationDay h3{font-size:16px;font-weight:600}
 .web-mobile-ready #mobileInstallationDay .installation-day-entry{border:0;border-radius:14px;background:white;padding:14px;color:#02826b;margin:8px 0;width:100%;font-size:14px}
 .web-mobile-ready #mapSection>.crm-tools{background:white;border-radius:20px;padding:20px;display:flex;flex-direction:column;align-items:stretch;margin-bottom:18px}
 .web-mobile-ready #mapSection>.crm-tools label{color:#02826b}.web-mobile-ready #mapSection>.crm-tools button{color:#02826b;background:#edfad9}
}
.mobile-mounting{display:none}
@media(max-width:600px){
 .web-mobile-ready #recordForm #equipmentFields .pv-equipment-group{display:flex;flex-direction:column;padding:6px 10px;gap:4px;border-radius:10px}
 .web-mobile-ready #recordForm #equipmentFields .pv-equipment-group>label.equipment-item{display:grid;grid-template-columns:minmax(32px,1fr) 70px 32px;width:100%;padding:0;border:0}
 .web-mobile-ready #recordForm #equipmentFields #pvMountingField{display:block;width:100%;font-size:0;margin:0;padding:0}
 .web-mobile-ready #pvMounting{display:none!important}
 .web-mobile-ready .mobile-mounting{display:grid;grid-template-columns:1fr 1fr;padding:2px;gap:2px;background:#eef0ed;border-radius:8px}
 .web-mobile-ready .mobile-mounting button{margin:0;padding:4px;min-height:28px;font-size:13px;border:0;background:transparent;color:#02826b;border-radius:6px}
 .web-mobile-ready .mobile-mounting button[aria-pressed=true]{background:white;box-shadow:0 1px 3px #0002}
}

@media(max-width:600px){
 .web-mobile-ready #recordForm #fileFields>.document-upload{padding:20px;background:white;border:0;border-radius:20px}
 .web-mobile-ready #recordForm #equipmentFields .equipment-toolbar select{width:100%;max-width:none;background:#eafaad;color:#02826b;text-align:center;border:0;border-radius:12px;min-height:44px}
 .web-mobile-ready #recordForm #documentFields>p{color:white;font-size:12px;line-height:1.4}
}
@media(max-width:600px){
 .web-mobile-ready #recordForm #fileFields>.document-upload>label,.web-mobile-ready #recordDetail .saved-documents>.document-upload>label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:15px;font-weight:500;min-height:30px;color:#02826b}
}

@media(max-width:600px){
 .web-mobile-ready #mapResults button{display:block;width:100%;background:white;color:#02826b;border:0;border-radius:14px;padding:14px;margin:8px 0;text-align:left;font-size:14px}
}
.mobile-equipment-add{display:none}
@media(max-width:600px){
 .web-mobile-ready .mobile-native-home button:not(.mobile-home-logout){display:flex;align-items:center;gap:20px;min-height:104px;padding:26px 24px;font-family:ui-rounded,-apple-system,BlinkMacSystemFont,system-ui,sans-serif;font-size:20px;font-weight:500;line-height:1.25;box-shadow:0 4px 10px #092b240f}
 .web-mobile-ready .mobile-native-home button:not(.mobile-home-logout)::after{margin-left:auto;font-size:24px;font-weight:400}
 .mobile-tile-icon{display:flex;align-items:center;flex:0 0 36px;width:36px;height:40px}.mobile-tile-icon svg{width:32px;height:32px}
 .web-mobile-ready #crm .contact-name,.web-mobile-ready #recordForm legend,.web-mobile-ready #recordDetail legend,.web-mobile-ready .mobile-customer-heading{font-family:ui-rounded,-apple-system,BlinkMacSystemFont,system-ui,sans-serif}
 .web-mobile-ready #recordForm #equipmentFields .equipment-toolbar>select{display:none}
 .web-mobile-ready #recordForm #equipmentFields .mobile-equipment-add{display:block;width:100%;min-height:44px;margin:0;border:0;border-radius:8px;padding:10px 12px;background:#02826b14;color:#02826b;font-size:15px;font-weight:500;text-align:center}
 .web-mobile-ready .mobile-equipment-dialog{width:min(290px,calc(100vw - 48px));padding:8px;border:0;border-radius:16px;background:#f5f7f5;color:#073f35;box-shadow:0 8px 35px #0003}
 .mobile-equipment-dialog::backdrop{background:#0003}
 .web-mobile-ready .mobile-equipment-dialog h2{font-size:13px;color:#6d7973;margin:8px 12px 10px;font-weight:500}
 .web-mobile-ready .mobile-equipment-dialog button{display:block;width:100%;height:44px;text-align:left;margin:0;padding:10px 14px;font-size:17px;font-weight:400;background:transparent;color:#02826b;border:0;border-top:1px solid #dbe4df;border-radius:0}
 .web-mobile-ready .mobile-equipment-dialog button:last-child{color:#687b73}
 .web-mobile-ready #recordForm #equipmentFields .equipment-item{background:transparent;font-size:15px;font-weight:500}
 .web-mobile-ready #recordForm #equipmentFields .equipment-item input{background:#02826b0f;border:0;border-radius:12px;font-size:15px;box-shadow:none}
}
@media(max-width:600px){
 .web-mobile-ready #recordForm #documentFields>legend,.web-mobile-ready #recordForm #documentFields>p{width:100%;text-align:center}
 .web-mobile-ready #recordForm #fileFields>.document-upload>label,.web-mobile-ready #recordDetail .saved-documents>.document-upload>label{justify-content:center;text-align:center;flex-wrap:wrap;gap:10px 16px}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>.saved-upload>button:first-child{text-align:center}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-dialog>h2{text-align:center;font-family:ui-rounded,-apple-system,BlinkMacSystemFont,sans-serif;font-size:20px;margin:0 0 20px}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-dialog .document-tools{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin:0;text-align:center}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-dialog .document-tools>input,.web-mobile-ready :is(#recordForm,#recordDetail) .document-dialog .document-tools>select{grid-column:1/-1;text-align:center;text-align-last:center;margin:0}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-dialog .document-tools>button{width:100%;margin:0;padding:10px 6px;min-height:44px;white-space:normal;text-align:center;font-size:14px;grid-row:auto}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-dialog .document-tools>button:nth-child(3){grid-column:1;grid-row:3;background:#02826b14;color:#02826b}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-dialog .document-tools>button:nth-child(4){grid-column:2;grid-row:3}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-dialog .document-tools>small{grid-column:1/-1;overflow-wrap:anywhere;text-align:center}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-dialog .document-tools>.collapse-document{grid-column:1/-1;grid-row:auto;background:transparent;border:0;color:#02826b}
}

@media(max-width:600px){.web-mobile-ready .mobile-tile-icon img{display:block;width:36px;height:40px;object-fit:contain}}

/* A saved attachment replaces the picker in the same compact mobile row. */
@media(max-width:600px){
 .web-mobile-ready #recordForm #fileFields>.document-upload:has(>.saved-upload:not([hidden]))>label,
 .web-mobile-ready #recordDetail .saved-documents>.document-upload:has(>.saved-upload:not([hidden]))>label{display:none}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>.saved-upload:not([hidden]){height:30px;min-height:30px;margin:0;grid-template-columns:minmax(0,1fr) 32px;gap:8px}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>.saved-upload>button:first-child{height:30px;min-height:30px;max-width:100%;padding:0;text-align:left;font-size:14px;line-height:30px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>.saved-upload>button:last-child{width:32px;height:30px;min-height:30px;padding:0;line-height:30px}
}
@media(max-width:600px){
 .web-mobile-ready #recordForm #fileFields>.document-upload>label,
 .web-mobile-ready #recordDetail .saved-documents>.document-upload>label{justify-content:space-between;text-align:left;flex-wrap:nowrap;gap:12px}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>label::after{flex-shrink:0}
}

@media(max-width:600px){
 .web-mobile-ready #recordForm #customerFields select#clientProvince{font-family:inherit;font-size:15px;font-weight:400;color:#02826b;-webkit-text-fill-color:#02826b;line-height:22px;height:22px;min-height:22px;padding:0 22px 0 0}
}

@media(max-width:600px){
 .web-mobile-ready #recordForm #equipmentFields>legend{margin-bottom:0}
 .web-mobile-ready #recordForm #equipmentFields>.field-grid:has(.equipment-item:not([hidden])){margin-top:10px}
 .web-mobile-ready #recordForm #equipmentFields>.equipment-toolbar{margin-top:10px}
}

@media(max-width:600px){.web-mobile-ready #recordForm #equipmentFields>legend,.web-mobile-ready #recordDetail .saved-equipment>legend{width:100%;text-align:center}}

@media(max-width:600px){
 .web-mobile-ready .installation-calendar{grid-template-columns:repeat(7,minmax(0,1fr));justify-items:stretch;gap:4px 2px}
 .web-mobile-ready .calendar-weekday{width:100%;box-sizing:border-box;text-align:center}
 .web-mobile-ready .calendar-day{width:100%;margin:0;display:flex;align-items:center;justify-content:center}
 .web-mobile-ready .calendar-day .calendar-date{display:flex;align-items:center;justify-content:center;text-align:center;box-sizing:border-box;min-width:0;width:100%;height:44px;min-height:44px;margin:0;padding:0 0 7px;border-radius:10px}
 .web-mobile-ready .calendar-day.mobile-day-selected{background:#02826b}
 .web-mobile-ready #mobileInstallationDay{background:white;color:#02826b;border-radius:20px;padding:20px;margin-top:16px}
 .web-mobile-ready #mobileInstallationDay h3{margin:0 0 10px;font-size:16px}
 .web-mobile-ready #mobileInstallationDay p{margin:0;color:#61776b;font-size:14px}
 .web-mobile-ready.mobile-home-main>main{min-height:100dvh;box-sizing:border-box;display:flex;flex-direction:column}
 .web-mobile-ready.mobile-home-main .mobile-native-home:not([hidden]){flex:1;min-height:440px;justify-content:flex-start;position:relative}
 .web-mobile-ready.mobile-home-main .mobile-native-home h2{margin:0}
 .web-mobile-ready.mobile-home-main>main>header{padding-bottom:10px}
 .web-mobile-ready.mobile-home-main .mobile-native-home>div{flex:1;justify-content:center;gap:20px;padding:20px 0 86px}
 .web-mobile-ready.mobile-home-main .mobile-native-home .mobile-home-logout{position:absolute;bottom:4px;left:0;right:0;width:100%;margin:0}
}

/* Mobile browser is the sales view; scheduling stays in desktop operations. */
@media(max-width:600px){.web-mobile-ready .installation-edit{display:none}}

/* Owner-only destructive action, separate from document controls. */
#recordDetail .record-delete-actions{grid-column:1/-1;display:flex;justify-content:flex-end;padding:12px 0;}
#recordDetail .record-delete-actions button{width:auto;min-width:0;min-height:40px;padding:9px 18px;margin:0;background:#fff;color:#a52b2b;border:1px solid #d8aaaa;border-radius:10px;font-size:14px;}
#recordDetail .record-delete-actions button:hover{background:#fff4f4;}

/* Extend the mobile canvas into Safari safe areas without moving controls under them. */
@media(max-width:600px){
 .web-mobile-ready.mobile-home-main>main{min-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));}
}

/* Search and select an assigned salesperson without changing the contact sort. */
.crm-tools .seller-filter{position:relative;flex:2;min-width:220px;margin-bottom:14px}
.crm-tools .seller-filter label{display:block;margin:0;font-size:14px}
.seller-filter-input{position:relative}.seller-filter-input input{width:100%;padding-right:40px;margin-bottom:0}
.crm-tools #clearSeller{position:absolute;right:5px;top:50%;transform:translateY(-50%);margin:0;padding:4px 10px;background:transparent;color:#02826b;border:0;min-height:32px}
.seller-suggestions{position:absolute;top:100%;left:0;right:0;z-index:30;max-height:250px;overflow:auto;background:white;border:1px solid #cbded6;border-radius:12px;box-shadow:0 8px 24px #00372e22;padding:6px}
.crm-tools .seller-suggestions button{display:block;width:100%;margin:0;padding:10px 12px;text-align:left;background:white;color:#073f35;border:0;font-size:15px;border-radius:8px}
.crm-tools .seller-suggestions button:hover,.crm-tools .seller-suggestions button:focus{background:#edfad9}
.seller-suggestions p{color:#53675e;padding:8px;margin:0;font-size:14px}
@media(max-width:600px){.crm-tools .seller-filter{grid-column:1/-1;min-width:0;margin:0}.web-mobile-ready .crm-tools .seller-filter label{font-size:13px;color:white}.crm-tools .seller-filter input{font-size:16px}}

@media(max-width:600px){.web-mobile-ready.mobile-home-open:not(.mobile-home-main) .mobile-native-home>h2{display:none!important}}

/* Explicit document actions: the optional delete control must not impersonate replace. */
:where(#recordForm,#recordDetail) .document-upload>.saved-upload:not([hidden]){display:flex;align-items:center;gap:8px}
:where(#recordForm,#recordDetail) .document-upload>.saved-upload>button:first-child{flex:1;min-width:0}
@media(max-width:600px){
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>.saved-upload:not([hidden]){display:flex;max-width:100%;height:auto;min-height:36px;gap:6px}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>.saved-upload>button:first-child{flex:1;min-width:0;width:0;text-align:left}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>.saved-upload>button:is(.document-replace,.document-remove){flex:0 0 32px;width:32px;height:36px;min-height:36px;max-width:32px;box-sizing:border-box;margin:0;padding:0;display:grid;place-items:center;line-height:1;background:transparent;color:#02826b;border:0;font-size:24px;overflow:hidden}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>.saved-upload>button:last-child::after{content:none}
 .web-mobile-ready :is(#recordForm,#recordDetail) .document-upload>.saved-upload>small{flex:0 1 80px;font-size:10px;line-height:1.2;color:#65776e}
 .web-mobile-ready #recordDetail .saved-field.saved-contract-number{grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center}
 .web-mobile-ready #recordDetail .saved-contract-number>span{white-space:nowrap;font-size:15px}
 .web-mobile-ready #recordDetail .saved-contract-number>strong{white-space:nowrap;overflow-wrap:normal;font-size:15px;overflow-x:auto;max-width:100%;min-width:0}
}

#recordForm .document-upload>.saved-upload:not([hidden]),#recordDetail .document-upload>.saved-upload:not([hidden]){display:flex;gap:8px;align-items:center}
#recordForm .document-upload>.saved-upload>button:first-child,#recordDetail .document-upload>.saved-upload>button:first-child{flex:1;min-width:0;width:0}
#recordForm .saved-upload>button:is(.document-replace,.document-remove),#recordDetail .saved-upload>button:is(.document-replace,.document-remove){flex:0 0 auto;width:auto;height:34px;min-height:34px;padding:8px 12px;white-space:nowrap;box-sizing:border-box}
.doc-action-icon{display:none}
@media(max-width:600px){
 .web-mobile-ready .doc-action-label{display:none}.web-mobile-ready .doc-action-icon{display:inline}
 .web-mobile-ready :is(#recordForm,#recordDetail) .saved-upload>button:is(.document-replace,.document-remove){flex:0 0 32px;width:32px;min-height:36px;height:36px;padding:0}
}

/* Compact mobile search; desktop keeps its original inline controls. */
#mobileFilterToggle,#mobileSellerChip{display:none}
@media(max-width:600px){
 .web-mobile-ready #crm>.crm-tools>label:nth-child(2){grid-column:1;min-width:0}
 .web-mobile-ready #crm>.crm-tools{gap:8px;align-items:center}
 .web-mobile-ready #crm #mobileFilterToggle{display:grid;place-items:center;width:48px;height:48px;min-height:48px;margin:0;padding:0;border:0;border-radius:15px;background:white;color:#02826b}
 .web-mobile-ready #search{height:48px;min-height:48px;font-size:16px;padding-top:12px;padding-bottom:12px}
 .web-mobile-ready #crm #mobileSellerChip:not([hidden]){display:block;grid-column:1/-1;justify-self:start;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#ffffffdd;color:#007763;font-size:13px;min-height:30px;margin:0;padding:5px 10px;border:0;border-radius:15px}
 #mobileFilterDialog{box-sizing:border-box;width:calc(100% - 32px);max-width:420px;max-height:85dvh;padding:22px;border-radius:22px;background:white;color:#073f35}
 #mobileFilterDialog h2{text-align:center;font-size:20px;margin:0 0 20px}
 #mobileFilterDialog .mobile-filter-fields{display:flex;flex-direction:column;gap:16px}
 #mobileFilterDialog label{display:block;color:#073f35;font-size:14px;margin:0;min-width:0}
 #mobileFilterDialog input,#mobileFilterDialog #recordSort{box-sizing:border-box;width:100%;height:46px;min-height:46px;margin:6px 0 0;padding:10px 12px;font-size:16px;color:#073f35;background:#f7faf8;border:1px solid #cadfd8;border-radius:10px;appearance:auto}
 #mobileFilterDialog .seller-filter{position:relative;min-width:0}
 #mobileFilterDialog #sellerQuery{padding-right:38px}
 #mobileFilterDialog #clearSeller{position:absolute;right:5px;top:50%;transform:translateY(-50%);margin:0;background:transparent;border:0;color:#02826b;padding:6px 10px}
 #mobileFilterDialog .seller-suggestions{position:relative;top:auto;max-height:180px;margin-top:6px}
 #mobileFilterDialog .seller-suggestions button{display:block;width:100%;text-align:left;padding:10px;margin:0;border:0;background:white;color:#073f35;font-size:15px}
 #mobileFilterDialog #direction{align-self:flex-start;color:#02826b;background:#edf7f1;border:0;border-radius:10px;font-size:14px;height:40px;min-height:40px;padding:8px 14px;margin:0}
 #mobileFilterDialog .mobile-filter-done{width:100%;height:46px;margin:22px 0 0;border:0;border-radius:12px;background:#02826b;color:white;font-size:16px}
}
