
/* ==================== v1.9.9 — Customer sidebar + Warranty editor + Content Manager ==================== */
body.customer-mode #customerLoggedInView{width:100%}
.customer-side-layout{display:grid;grid-template-columns:minmax(0,1fr) 248px;gap:18px;align-items:start;direction:ltr}
.customer-side-main{grid-column:1;min-width:0;direction:inherit}
.customer-side-panel{grid-column:2;position:sticky;top:92px;height:calc(100vh - 110px);overflow-y:auto;overscroll-behavior:contain;background:var(--dark);color:#fff;border-radius:18px;padding:14px 11px;direction:inherit;box-shadow:0 14px 34px rgba(11,35,24,.14)}
body.customer-mode .customer-side-panel #customerPortalHead{display:block!important;position:static!important;margin:0 0 10px!important;padding:12px 10px 14px!important;background:transparent!important;border-radius:0!important;box-shadow:none!important;border-bottom:1px solid rgba(255,255,255,.13)!important;color:#fff!important}
body.customer-mode .customer-side-panel #customerPortalHead small{color:#9fc5ad!important}
body.customer-mode .customer-side-panel #customerPortalHead h3{font-size:16px!important;line-height:1.35;margin:4px 0!important;color:#fff!important}
body.customer-mode .customer-side-panel #customerPortalHead p{font-size:10px!important;line-height:1.55;color:#b8c9bf!important;word-break:break-word}
body.customer-mode .customer-side-panel #customerPortalHead .btn{width:100%;margin-top:10px;padding:9px 10px!important;font-size:11px;background:#fff!important;color:var(--dark)!important;border-color:#fff!important}
body.customer-mode .customer-side-panel #customerPortalNav{position:static!important;top:auto!important;z-index:auto!important;display:flex!important;flex-direction:column!important;gap:3px!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible!important;scrollbar-width:none!important}
body.customer-mode .customer-side-panel #customerPortalNav button{width:100%!important;min-height:0!important;height:auto!important;flex:0 0 auto!important;display:grid!important;grid-template-columns:28px 1fr!important;align-items:center!important;gap:7px!important;padding:9px 9px!important;margin:0!important;border:0!important;border-radius:9px!important;background:transparent!important;color:#dce8e1!important;text-align:start!important;box-shadow:none!important}
body.customer-mode .customer-side-panel #customerPortalNav button span{font-size:14px!important;width:24px;height:24px;display:grid;place-items:center;background:rgba(255,255,255,.07);border-radius:7px}
body.customer-mode .customer-side-panel #customerPortalNav button b{font-size:11px!important;line-height:1.3;font-weight:700!important}
body.customer-mode .customer-side-panel #customerPortalNav button.active,body.customer-mode .customer-side-panel #customerPortalNav button:hover{background:rgba(255,255,255,.11)!important;color:#fff!important}
body.customer-mode .customer-side-panel #customerPortalNav button.active span{background:var(--g);color:#fff}
.customer-side-tools{border-top:1px solid rgba(255,255,255,.13);margin-top:10px;padding-top:9px;display:grid;gap:5px}
.customer-side-tools button{width:100%;border:0;border-radius:9px;padding:9px 10px;text-align:start;background:rgba(255,255,255,.06);color:#dce8e1;font-size:11px;font-weight:700}
.customer-side-tools button:hover{background:rgba(255,255,255,.12);color:#fff}
.customer-side-main #customerPortalKpis{margin-top:0}
@media(max-width:980px){.customer-side-layout{grid-template-columns:1fr;direction:rtl}.customer-side-panel{grid-column:1;grid-row:1;position:static;height:auto;border-radius:15px}.customer-side-main{grid-column:1;grid-row:2}.customer-side-panel #customerPortalNav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}.customer-side-tools{grid-template-columns:1fr 1fr}}

/* Sales content manager */
.content-manager-panel{display:grid;gap:16px}.cm-section-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.cm-section-card{border:1px solid var(--line);background:#fff;border-radius:16px;padding:18px;text-align:center;cursor:pointer;transition:.18s}.cm-section-card:hover,.cm-section-card.active{transform:translateY(-1px);border-color:#9fd4af;box-shadow:0 10px 28px rgba(25,70,45,.08)}.cm-section-card span{width:46px;height:46px;margin:0 auto 8px;border-radius:13px;display:grid;place-items:center;background:#edf8f1;font-size:21px}.cm-section-card b{display:block;font-size:14px}.cm-section-card small{display:block;margin-top:4px;color:var(--muted);font-size:10px}.cm-workspace{background:#fff;border:1px solid var(--line);border-radius:17px;padding:18px;min-height:230px}.cm-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}.cm-toolbar h3{margin:0}.cm-uploader{display:grid;grid-template-columns:1.1fr .8fr 1.3fr auto;gap:8px;align-items:end;background:#f7faf8;border:1px solid var(--line);padding:12px;border-radius:13px;margin-bottom:14px}.cm-uploader .field label{font-size:10px}.cm-list{display:grid;gap:8px}.cm-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;border:1px solid #e0e8e3;border-radius:12px;padding:11px 12px}.cm-item-main{min-width:0}.cm-item-main b{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cm-item-main small{display:block;color:var(--muted);font-size:9px;margin-top:3px}.cm-item-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}.cm-mini{border:1px solid var(--line);background:#fff;border-radius:8px;padding:6px 8px;font-size:9px;font-weight:800}.cm-mini.danger{color:#9c3333;border-color:#eccaca;background:#fff7f7}.cm-mini.hidden-state{color:#8a5d00;border-color:#ead8a5;background:#fffaf0}.managed-file-card{border:1px dashed #b9d6c2!important;background:#fbfefc!important}.managed-file-card .managed-file-icon{height:160px;display:grid;place-items:center;background:#f0f7f2;font-size:38px;color:#287448;border-bottom:1px solid var(--line)}
@media(max-width:900px){.cm-section-grid{grid-template-columns:repeat(2,1fr)}.cm-uploader{grid-template-columns:1fr 1fr}.cm-uploader .field:nth-child(3){grid-column:1/-1}}
@media(max-width:560px){.cm-section-grid,.cm-uploader{grid-template-columns:1fr}.cm-item{grid-template-columns:1fr}.cm-item-actions{justify-content:flex-start}}

/* Warranty Word-like editor */
.warranty-editor-modal{position:fixed;inset:0;z-index:160;background:rgba(8,21,14,.76);display:none;align-items:stretch;justify-content:center}.warranty-editor-modal.open{display:flex}.warranty-editor-shell{width:min(1220px,100vw);height:100vh;background:#e9ecea;display:flex;flex-direction:column}.warranty-editor-toolbar{height:62px;flex:0 0 auto;background:#fff;border-bottom:1px solid #d5ded8;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 14px;position:sticky;top:0;z-index:5}.warranty-editor-toolbar .left{min-width:0}.warranty-editor-toolbar b{display:block;font-size:14px}.warranty-editor-toolbar small{display:block;color:var(--muted);font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.warranty-editor-toolbar .right{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.wl-tool{border:1px solid #ccd9d1;background:#fff;border-radius:9px;padding:7px 10px;font-size:10px;font-weight:800}.wl-tool.primary{background:var(--g);border-color:var(--g);color:#fff}.wl-tool.close{background:#f2f5f3;float:none}.warranty-editor-stage{flex:1;overflow:auto;padding:26px 0 50px;direction:ltr}.warranty-doc{display:grid;gap:24px;justify-content:center}.wl-page{position:relative;width:210mm;height:296.47mm;background-size:100% 100%;background-repeat:no-repeat;background-color:#fff;box-shadow:0 8px 28px rgba(0,0,0,.18);overflow:hidden;print-color-adjust:exact;-webkit-print-color-adjust:exact}.wl-edit{position:absolute;background:#fff;color:#111;font-family:Arial,Helvetica,sans-serif;outline:none}.wl-edit[contenteditable="true"]:focus{box-shadow:0 0 0 2px rgba(47,174,80,.28);border-radius:2px}.wl-datebox{left:11.2%;top:14.55%;width:52%;height:5.5%;font-weight:700;font-size:13.5px;line-height:1.8;padding:1px 2px}.wl-title-cover{left:35%;top:22.7%;width:36%;height:4.5%}.wl-party{left:10.2%;top:28.25%;width:76%;min-height:4.4%;font-size:13px;font-weight:700;color:#102e66;padding:3px 6px;border-bottom:1.2px solid #111}.wl-party .project-line{display:block;margin-top:4px;color:#102e66;font-weight:700}.wl-bodytext{left:9.6%;top:31.3%;width:77.4%;height:15.2%;font-size:11.8px;line-height:1.43;padding:4px 7px;font-weight:400}.wl-table-zone{left:12.25%;top:49.15%;width:61.4%;min-height:17.6%;padding:0;background:#fff}.wl-table{width:100%;border-collapse:collapse;font-family:Arial,sans-serif;font-size:10.8px;text-align:center}.wl-table th,.wl-table td{border:1px solid #111;padding:5px 4px;height:28px}.wl-table th{font-weight:800}.wl-page2-client{left:13.9%;top:21.55%;width:73%;height:4.1%;padding:7px 8px;font-family:Arial,sans-serif;font-size:11.4px}.wl-editing-note{font-size:9px;color:#68766e}.wl-editing-note strong{color:#187b40}
body.warranty-print-v199 *{visibility:hidden!important}body.warranty-print-v199 #warrantyEditorModal,body.warranty-print-v199 #warrantyEditorModal *{visibility:visible!important}body.warranty-print-v199 #warrantyEditorModal{position:absolute!important;inset:0!important;background:#fff!important;display:block!important}body.warranty-print-v199 .warranty-editor-toolbar{display:none!important}body.warranty-print-v199 .warranty-editor-shell{width:auto!important;height:auto!important;background:#fff!important}body.warranty-print-v199 .warranty-editor-stage{overflow:visible!important;padding:0!important}body.warranty-print-v199 .warranty-doc{display:block!important}body.warranty-print-v199 .wl-page{width:210mm!important;height:296.47mm!important;margin:0!important;box-shadow:none!important;page-break-after:always!important}body.warranty-print-v199 .wl-page:last-child{page-break-after:auto!important}
@page{size:A4;margin:0}
