
#sgsaAdminView .sgsa-admin-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0 16px;border-bottom:1px solid #dce5e0;padding-bottom:10px}
#sgsaAdminView .sgsa-admin-tabs button{border:1px solid #d9e3dd;background:#fff;color:#214535;padding:10px 19px;border-radius:9px;font:inherit;font-weight:600;cursor:pointer}
#sgsaAdminView .sgsa-admin-tabs button[aria-selected="true"]{background:#075a3c;color:#fff;border-color:#075a3c}
#sgsaAdminView .sgsa-admin-tabs button:focus-visible{outline:3px solid #75b69b;outline-offset:2px}
#sgsaAdminView .sgsa-section-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 18px}
#sgsaAdminView .sgsa-section-tabs button{font:inherit;font-weight:600;background:#fff;border:1px solid #cbded4;border-radius:9px;color:#183c44;padding:10px 14px;cursor:pointer}
#sgsaAdminView .sgsa-section-tabs button[aria-selected="true"]{background:#086240;border-color:#086240;color:white}
#sgsaAdminView .sgsa-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:8px 0 15px}
#sgsaAdminView .sgsa-records{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr));gap:13px}
#sgsaAdminView .sgsa-entry{border:1px solid #d5e4dc;border-radius:12px;padding:16px;background:#fff}
#sgsaAdminView .sgsa-entry-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
#sgsaAdminView .sgsa-entry-head strong{font-size:16px}
#sgsaAdminView .sgsa-entry-fields{display:grid;gap:8px}
#sgsaAdminView .sgsa-entry-fields p{margin:4px 0 6px;white-space:pre-wrap;overflow-wrap:anywhere}
#sgsaAdminView .sgsa-entry-fields strong{font-size:12px;color:#477262}
#sgsaAdminView .sgsa-media-grid{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
#sgsaAdminView .sgsa-photo{display:grid;gap:5px;font-size:12px;min-width:100px}
#sgsaAdminView .sgsa-photo img{max-width:220px;width:100%;height:135px;object-fit:contain;border-radius:8px;border:1px solid #d5e4dc;background:#f7faf8}
#sgsaAdminView .sgsa-parent-filter{display:flex;gap:10px;align-items:center;margin:12px 0}
.sgsa-edit-dialog{border:0;border-radius:15px;width:min(660px,95vw);max-height:90vh;padding:24px;box-shadow:0 12px 65px #0004}
.sgsa-edit-form h3{margin-top:0}.sgsa-edit-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;max-height:62vh;overflow:auto}
.sgsa-edit-fields label{display:grid;gap:5px;font-size:13px;font-weight:600}.sgsa-edit-fields textarea,.sgsa-edit-fields input,.sgsa-edit-fields select{font:inherit;font-weight:400;padding:10px;border:1px solid #cbded4;border-radius:8px;min-width:0;width:100%;box-sizing:border-box}
.sgsa-edit-dialog.sgsa-cleaning-dialog{width:min(1160px,96vw);max-width:calc(100vw - 24px);max-height:94dvh;box-sizing:border-box}
.sgsa-cleaning-dialog .sgsa-edit-form{display:flex;flex-direction:column;max-height:calc(94dvh - 48px);margin:0}
.sgsa-cleaning-dialog .sgsa-edit-fields{min-height:0;max-height:none;flex:1 1 auto;gap:16px}
.sgsa-cleaning-dialog .sgsa-edit-form>h3,.sgsa-cleaning-dialog .sgsa-form-actions,.sgsa-cleaning-dialog .sgsa-save-status{flex:none}
.sgsa-cleaning-dialog .sgsa-edit-fields>label{align-content:start}
.sgsa-cleaning-products{grid-column:1/-1;min-width:0;border:0;margin:0;padding:0;font-size:14px;align-self:start}
.sgsa-cleaning-products legend{font-weight:600;margin-bottom:5px}.sgsa-cleaning-products details{border:1px solid #cbded4;border-radius:8px;background:white;overflow:hidden}.sgsa-cleaning-products summary{padding:12px;cursor:pointer;overflow-wrap:anywhere}.sgsa-cleaning-products [data-cleaning-options]{max-height:clamp(240px,42vh,420px);overflow:auto;border-top:1px solid #e4ede7;padding:4px}
.sgsa-cleaning-products [data-cleaning-options] label{display:grid;grid-template-columns:20px minmax(170px,1fr) minmax(0,2fr);align-items:start;gap:12px;padding:12px 9px;font-weight:400;font-size:14px;overflow-wrap:anywhere;cursor:pointer;border-bottom:1px solid #edf2ef}.sgsa-cleaning-products [data-cleaning-options] label:last-child{border-bottom:0}.sgsa-cleaning-products [data-cleaning-options] label:hover{background:#f4f9f6}
.sgsa-cleaning-products .sgsa-cleaning-product-name{font-weight:600;line-height:1.45;min-width:0}.sgsa-cleaning-products .sgsa-cleaning-product-usage{font-weight:400;color:#425d51;line-height:1.45;white-space:pre-wrap;min-width:0}
.sgsa-cleaning-products input[type=checkbox]{width:18px;height:18px;margin:2px 0 0;accent-color:#095338}.sgsa-cleaning-products small{display:block;margin-top:7px;font-weight:400;color:#476252}.sgsa-cleaning-products p{font-weight:400;overflow-wrap:anywhere}.sgsa-cleaning-products p:empty{display:none}
@media(max-width:650px){.sgsa-edit-dialog.sgsa-cleaning-dialog{padding:16px}.sgsa-cleaning-dialog .sgsa-edit-form{max-height:calc(94dvh - 32px)}.sgsa-cleaning-products [data-cleaning-options] label{grid-template-columns:20px minmax(0,1fr);gap:5px 10px}.sgsa-cleaning-product-usage{grid-column:2}.sgsa-cleaning-products [data-cleaning-options]{max-height:42vh}}
.sgsa-form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:15px}.sgsa-save-status{color:#b34034}
@media(max-width:650px){.sgsa-edit-fields{grid-template-columns:1fr}}


#sgsaAdminView .sgsa-parent-list{display:grid;gap:10px}
#sgsaAdminView .sgsa-parent-row{display:flex;align-items:center;gap:12px;border:1px solid #cbded4;border-radius:10px;background:#fff;padding:10px}
#sgsaAdminView .sgsa-parent-open{flex:1;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px;border:0;background:transparent;color:#174e3c;font:inherit;font-weight:700;text-align:left;cursor:pointer;overflow-wrap:anywhere}
#sgsaAdminView .sgsa-parent-open:hover{background:#edf5f1;border-radius:8px}
#sgsaAdminView .sgsa-parent-open:focus-visible{outline:3px solid #75b69b;border-radius:8px}
#sgsaAdminView .sgsa-child-breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin:16px 0}
.sgsa-edit-fields .sgsa-parent-context,.sgsa-edit-fields .sgsa-catalog-picker{grid-column:1/-1;min-width:0}
.sgsa-edit-fields .sgsa-parent-context{padding:10px;background:#edf5f1;border-radius:8px;color:#174e3c}
@media(max-width:650px){#sgsaAdminView .sgsa-section-head{flex-wrap:wrap}#sgsaAdminView .sgsa-parent-row{gap:5px}#sgsaAdminView .sgsa-child-breadcrumb{gap:8px}}

#sgsaAdminView .sgsa-pdf-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:13px 20px;min-height:48px;border-radius:10px;background:#075a3e;border:1px solid #075a3e;color:#fff;text-decoration:none;font:inherit;font-weight:700;box-shadow:0 2px 5px #0001}
#sgsaAdminView .sgsa-pdf-button.secondary{background:#edf3f5;border-color:#d5e1e5;color:#153c48}
#sgsaAdminView .sgsa-pdf-button:hover{filter:brightness(.95)}
#sgsaAdminView .sgsa-pdf-button:focus-visible{outline:3px solid #3387a7;outline-offset:3px}
#sgsaAdminView{min-width:0}#sgsaAdminView .secondary-action{display:inline-block;text-decoration:none}
#sgsaAdminView .sgsa-section-detail{max-width:100%}.sgsa-edit-dialog::backdrop{background:#0005}
@media(max-width:600px){#sgsaAdminView .sgsa-pdf-button{flex:1 1 100%;width:100%}.sgsa-edit-dialog{box-sizing:border-box;width:calc(100vw - 24px);padding:16px}.sgsa-edit-fields{grid-template-columns:1fr!important}#sgsaAdminView .sgsa-section-tabs{gap:6px}#sgsaAdminView .sgsa-section-tabs button{font-size:14px;padding:10px}}

/* SGSA creation is limited to the internal management screen. */
#sgsaAdminView .sgsa-empty-state{max-width:740px;padding:24px;border:1px solid #d5e4dc;border-radius:12px;background:linear-gradient(135deg,#f3f8f5,#fff);margin:18px 0 4px}
#sgsaAdminView .sgsa-empty-state h3{margin:0 0 8px;color:#174e3c;font-size:20px}
#sgsaAdminView .sgsa-empty-state p{margin:0 0 20px;line-height:1.6;color:#405e55}
#sgsaAdminView .sgsa-create-action,.sgsa-create-dialog .sgsa-create-action{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:12px 20px;border:1px solid #075a3c;border-radius:9px;background:#075a3c;color:#fff;font:inherit;font-weight:700;line-height:1.3;cursor:pointer}
#sgsaAdminView .sgsa-create-action:hover,.sgsa-create-dialog .sgsa-create-action:hover{background:#064b32}
#sgsaAdminView .sgsa-create-action:focus-visible,.sgsa-create-dialog button:focus-visible{outline:3px solid #75b69b;outline-offset:3px}
.sgsa-create-dialog{box-sizing:border-box;width:min(560px,calc(100vw - 24px));color:#183c44}
.sgsa-create-dialog h3{font-size:22px;color:#174e3c;margin-bottom:10px}
.sgsa-create-dialog #sgsaCreateHelp{line-height:1.6;margin:0 0 18px;color:#405e55}
.sgsa-create-dialog .sgsa-create-client{display:grid;gap:6px;padding:14px 16px;margin-bottom:18px;border-radius:9px;background:#edf5f1;overflow-wrap:anywhere}
.sgsa-create-dialog .sgsa-create-client span{font-size:13px;color:#477262}
.sgsa-create-dialog .sgsa-edit-fields{grid-template-columns:1fr;max-width:260px;overflow:visible}
.sgsa-create-dialog .sgsa-create-note{font-size:14px;line-height:1.6;color:#536a62;margin:16px 0 0}
.sgsa-create-dialog .sgsa-save-status:empty{display:none}
.sgsa-create-dialog .sgsa-save-status[data-state="saving"]{color:#174e3c}
.sgsa-create-dialog .sgsa-form-actions{margin-top:22px;flex-wrap:wrap}
.sgsa-create-dialog button:disabled{opacity:.65;cursor:wait}
@media(max-width:600px){#sgsaAdminView .sgsa-empty-state{padding:18px}.sgsa-create-dialog .sgsa-form-actions button{flex:1 1 auto}}

/* Larger type only in the Add/Edit subsections form. */
.sgsa-edit-dialog.sgsa-subsections-dialog{box-sizing:border-box;width:min(920px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);padding:28px;font-size:20px;line-height:1.5;color:#183c44;overflow:hidden}
.sgsa-subsections-dialog .sgsa-edit-form{display:flex;flex-direction:column;max-height:calc(100vh - 88px);max-height:calc(100dvh - 88px);margin:0}
.sgsa-subsections-dialog .sgsa-edit-form>h3{flex:none;margin:0 0 20px;font-size:28px;line-height:1.25;color:#174e3c}
.sgsa-subsections-dialog .sgsa-edit-fields{flex:1 1 auto;min-height:0;max-height:none;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;overflow:auto;padding:2px 6px 4px 2px}
.sgsa-subsections-dialog .sgsa-edit-fields label{min-width:0;align-content:start;gap:8px;font-size:20px;line-height:1.45;font-weight:600}
.sgsa-edit-dialog.sgsa-subsections-dialog .sgsa-edit-fields input,.sgsa-edit-dialog.sgsa-subsections-dialog .sgsa-edit-fields select,.sgsa-edit-dialog.sgsa-subsections-dialog .sgsa-edit-fields textarea{font:inherit;font-size:20px!important;font-weight:400;line-height:1.5;padding:12px 14px;min-height:54px;border-radius:9px;background:#fff;color:#183c44}
.sgsa-subsections-dialog .sgsa-edit-fields textarea{min-height:112px;resize:vertical}
.sgsa-subsections-dialog .sgsa-edit-fields input[type=file]{padding:8px;font-size:18px!important}
.sgsa-subsections-dialog input[type=file]::file-selector-button{font:inherit;line-height:1.4;min-height:42px;padding:8px 10px;margin-right:10px;border:1px solid #cbded4;border-radius:7px;background:#edf5f1;color:#174e3c;cursor:pointer}
.sgsa-subsections-dialog .sgsa-parent-context{padding:14px 16px;font-size:20px;line-height:1.5;overflow-wrap:anywhere}
.sgsa-subsections-dialog .sgsa-catalog-picker p,.sgsa-subsections-dialog .sgsa-catalog-picker [role=status]{font-size:18px;line-height:1.5;margin:10px 0 0}
.sgsa-subsections-dialog .photo-device-actions{align-self:center;align-items:flex-start}
.sgsa-subsections-dialog button{font:inherit;font-size:20px;line-height:1.4;font-weight:600;min-height:50px;max-width:100%;padding:12px 18px;border:1px solid #cbded4;border-radius:9px;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
.sgsa-subsections-dialog .sgsa-form-actions{flex:none;flex-wrap:wrap;gap:12px;margin-top:20px}
.sgsa-subsections-dialog .sgsa-form-actions button{min-width:128px;background:#fff;color:#174e3c}
.sgsa-subsections-dialog .sgsa-form-actions button[type=submit]{background:#075a3c;border-color:#075a3c;color:#fff;font-weight:700}
.sgsa-subsections-dialog .sgsa-save-status{flex:none;font-size:18px;line-height:1.5;margin:12px 0 0}
.sgsa-subsections-dialog .sgsa-save-status:empty{display:none}
.sgsa-subsections-dialog button:focus-visible,.sgsa-subsections-dialog input:focus-visible,.sgsa-subsections-dialog select:focus-visible,.sgsa-subsections-dialog textarea:focus-visible{outline:3px solid #75b69b;outline-offset:2px}
@media(max-width:700px){.sgsa-edit-dialog.sgsa-subsections-dialog{width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);padding:18px}.sgsa-subsections-dialog .sgsa-edit-form{max-height:calc(100vh - 60px);max-height:calc(100dvh - 60px)}.sgsa-subsections-dialog .sgsa-edit-form>h3{font-size:26px}.sgsa-subsections-dialog .sgsa-edit-fields{grid-template-columns:minmax(0,1fr)}.sgsa-subsections-dialog .sgsa-form-actions button{flex:1 1 120px}.sgsa-subsections-dialog .photo-device-actions{align-self:start}.sgsa-subsections-dialog .photo-device-actions button{width:100%}}


/* Created SGSA overview: internal management only, isolated from detail tables. */
#sgsaAdminView .sgsa-overview-toolbar{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin:22px 0 18px}
#sgsaAdminView .sgsa-overview-client-filter{display:grid;gap:7px;font-size:14px;font-weight:600;min-width:min(320px,100%);max-width:600px;flex:0 1 480px}
#sgsaAdminView .sgsa-overview-client-filter select{width:100%;min-width:0;min-height:46px;box-sizing:border-box;font-size:16px}
#sgsaAdminView .sgsa-overview-toolbar>button{min-height:46px;padding:12px 20px;font-size:15px}
#sgsaAdminView .sgsa-overview-head{display:flex;justify-content:space-between;align-items:flex-end;flex-wrap:wrap;gap:20px;margin:24px 0 18px}
#sgsaAdminView .sgsa-overview-head h3{margin:0 0 8px;font-size:23px;line-height:1.25;color:#174e3c}
#sgsaAdminView .sgsa-overview-head p{margin:0;color:#536b63;font-size:14px;line-height:1.5}
#sgsaAdminView .sgsa-overview-separator{padding:0 5px;color:#839b91}
#sgsaAdminView .sgsa-overview-search{display:grid;gap:7px;flex:0 1 340px;font-size:14px;font-weight:600;min-width:220px;color:#31594a}
#sgsaAdminView .sgsa-overview-search input{width:100%;box-sizing:border-box;min-height:46px;border:1px solid #cbded4;border-radius:9px;background:#fff;padding:11px 14px;font:inherit;font-size:16px;font-weight:400;color:#183c44}
#sgsaAdminView .sgsa-overview-table-wrap{border:1px solid #dbe7e0;border-radius:12px;overflow:auto;background:#fff}
#sgsaAdminView .sgsa-overview-table{width:100%;border-collapse:collapse;font-size:16px;color:#183c44;line-height:1.45;text-align:left}
#sgsaAdminView .sgsa-overview-table th{padding:14px 18px;background:#eff5f2;font-size:13px;font-weight:700;color:#426455;white-space:nowrap}
#sgsaAdminView .sgsa-overview-table td{padding:16px 18px;border-top:1px solid #e5ede8;vertical-align:middle}
#sgsaAdminView .sgsa-overview-table tbody tr:hover{background:#f8fbf9}
#sgsaAdminView .sgsa-overview-client{width:42%;min-width:210px;overflow-wrap:anywhere}
#sgsaAdminView .sgsa-overview-client strong{display:block;font-size:16px;font-weight:700;color:#174e3c}
#sgsaAdminView .sgsa-overview-client>span{display:block;font-size:13px;color:#6a7d74;margin-top:4px}
#sgsaAdminView .sgsa-overview-state{display:inline-flex;align-items:center;min-height:28px;box-sizing:border-box;padding:4px 10px;border-radius:6px;font-size:13px;line-height:1.4;font-weight:600;white-space:nowrap}
#sgsaAdminView .sgsa-overview-state.ready{background:#e9f4ed;color:#236045}
#sgsaAdminView .sgsa-overview-state.pending{background:#fbf1dc;color:#7b5716}
#sgsaAdminView .sgsa-overview-state.neutral{background:#edf1f3;color:#4d626b}
#sgsaAdminView .sgsa-overview-pdf{display:inline-flex;align-items:center;min-height:44px;gap:7px;font-size:14px;font-weight:700;color:#176c52;text-decoration:none;white-space:nowrap}
#sgsaAdminView .sgsa-overview-pdf:hover{text-decoration:underline}
#sgsaAdminView .sgsa-overview-no-pdf{font-size:13px;color:#6b7b74;white-space:nowrap}
#sgsaAdminView .sgsa-overview-action{text-align:right;width:1%;white-space:nowrap}
#sgsaAdminView .sgsa-overview-open{display:inline-flex;align-items:center;justify-content:center;min-height:44px;border:1px solid #b5d1c3;border-radius:8px;padding:10px 16px;background:#f0f7f3;color:#075a3c;font:inherit;font-size:14px;font-weight:700;white-space:nowrap;cursor:pointer}
#sgsaAdminView .sgsa-overview-open:hover{background:#e0eee6;border-color:#79ad94}
#sgsaAdminView .sgsa-overview-open:focus-visible,#sgsaAdminView .sgsa-overview-pdf:focus-visible,#sgsaAdminView .sgsa-overview-search input:focus-visible,#sgsaAdminView .sgsa-overview-toolbar select:focus-visible{outline:3px solid #75b69b;outline-offset:3px}
#sgsaAdminView .sgsa-overview-empty{padding:24px 4px;color:#536b63}
#sgsaAdminView .sgsa-overview-empty h3,#sgsaAdminView .sgsa-overview-empty h4{margin:0 0 10px;color:#174e3c;font-size:20px}
#sgsaAdminView .sgsa-overview-empty p{line-height:1.6;margin:0 0 18px}
#sgsaAdminView .sgsa-detail-navigation{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin:20px 0;color:#426455;font-size:14px}
#sgsaAdminView .sgsa-detail-navigation>button{min-height:44px;font-size:15px;padding:10px 16px}
#sgsaAdminView .sgsa-detail-navigation>span{overflow-wrap:anywhere}
#sgsaAdminView .sgsa-overview-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:1000px) and (min-width:761px){
 #sgsaAdminView .sgsa-overview-table th,#sgsaAdminView .sgsa-overview-table td{padding:14px 12px}
 #sgsaAdminView .sgsa-overview-client{min-width:180px}
}
@media(max-width:760px){
 #sgsaAdminView .sgsa-admin-panel{padding:18px!important}
 #sgsaAdminView .sgsa-overview-toolbar{gap:10px}
 #sgsaAdminView .sgsa-overview-client-filter{flex:1 1 100%;max-width:none}
 #sgsaAdminView .sgsa-overview-head{gap:16px}
 #sgsaAdminView .sgsa-overview-search{flex:1 1 100%;min-width:0}
 #sgsaAdminView .sgsa-overview-table-wrap{border:0;background:transparent;overflow:visible}
 #sgsaAdminView .sgsa-overview-table,#sgsaAdminView .sgsa-overview-table tbody{display:block}
 #sgsaAdminView .sgsa-overview-table thead{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
 #sgsaAdminView .sgsa-overview-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px 12px;padding:18px;margin-bottom:12px;background:#fff;border:1px solid #dbe7e0;border-radius:12px}
 #sgsaAdminView .sgsa-overview-table td{display:block;border:0;padding:0;min-width:0;width:auto}
 #sgsaAdminView .sgsa-overview-table .sgsa-overview-client{grid-column:1/-1}
 #sgsaAdminView .sgsa-overview-table td[data-label]::before{content:attr(data-label);display:block;margin:0 0 6px;font-size:12px;font-weight:600;color:#6a7d74}
 #sgsaAdminView .sgsa-overview-action{align-self:end;text-align:right}
 #sgsaAdminView .sgsa-overview-open{max-width:100%;font-size:13px;padding:10px 12px}
 #sgsaAdminView .sgsa-overview-pdf,#sgsaAdminView .sgsa-overview-no-pdf{font-size:13px;white-space:normal}
 #sgsaAdminView .sgsa-detail-navigation{align-items:flex-start;flex-direction:column;gap:10px}
}

