:root{
  --navy:#0b2342;--navy-2:#102e55;--blue:#0b61dc;--blue-2:#0a55c4;--ink:#10213e;--muted:#66758c;--line:#d9e3ef;--panel:#fff;--bg:#f5f8fc;--soft:#eef5ff;--danger:#bd2c36;--success:#138a55;
}
*{box-sizing:border-box}html{font-size:16px}body{margin:0;min-height:100vh;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;display:grid;grid-template-columns:255px minmax(0,1fr)}button,input,select,textarea{font:inherit}.sidebar{position:sticky;top:0;height:100vh;background:linear-gradient(180deg,#09213f 0%,#0d2a4c 75%,#0a213d 100%);color:#fff;padding:22px 14px 18px;display:flex;flex-direction:column;box-shadow:8px 0 30px #091a3010;z-index:20}.brand{display:flex;gap:12px;align-items:flex-start;color:#fff;text-decoration:none;padding:5px 10px 24px}.brand-copy strong{font-size:26px;line-height:.9;letter-spacing:.5px;font-weight:700}.brand-copy small{display:block;margin-top:12px;font-size:9px;line-height:1.45;letter-spacing:1.4px;color:#d6e1ef}
.side-nav{display:grid;gap:3px}
.side-nav a{display:flex;align-items:center;gap:12px;color:#e6edf7;text-decoration:none;padding:9px 13px;margin-bottom:0;border-radius:8px;font-size:15px;transition:.18s ease}.side-nav a:hover{background:#16395f}.side-nav a.active{background:linear-gradient(90deg,#0d5ed2,#0753ba);box-shadow:0 8px 22px #031b3e55;color:#fff;font-weight:700}.side-nav a.disabled{opacity:.82;cursor:default}.nav-icon{width:22px;text-align:center}.sidebar-spacer{flex:1}.user-block{border-top:1px solid #ffffff35;padding:18px 8px 12px;display:grid;grid-template-columns:40px 1fr 20px;gap:10px;align-items:center}.avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#1e66c6;color:#fff;font-weight:700}.user-block strong{display:block;font-size:14px}.user-block small{display:block;font-size:12px;color:#c3d1e2;margin-top:3px}.chevron{font-size:26px;color:#b8c7da}.signout{color:#e3eaf4;text-decoration:none;padding:7px 8px;font-size:14px}.signout span{margin-right:9px}.app-shell{min-width:0}.topbar{height:56px;background:#fff;border-bottom:1px solid var(--line);padding:0 30px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:10}.topbar h1{font-size:23px;margin:0}.topbar-meta{display:flex;align-items:center;gap:11px;color:#41526e;font-size:12px;letter-spacing:.4px}.topbar-meta .divider{width:1px;height:22px;background:#d9e1ec}.menu-toggle{display:none;background:none;border:0;font-size:24px;color:var(--ink)}.page-wrap{max-width:1260px;margin:0 auto;padding:16px 28px 20px}.progress{display:grid;grid-template-columns:auto minmax(60px,1fr) auto minmax(60px,1fr) auto;align-items:center;max-width:900px;margin:0 auto 16px}.progress-step{display:flex;align-items:center;gap:12px}.step-number{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#d5dfed;color:#fff;font-weight:700;font-size:17px;flex:0 0 auto}.progress-step strong{display:block;font-size:15px;white-space:nowrap}.progress-step small{display:block;color:#718097;font-size:11px;margin-top:3px;white-space:nowrap}.progress-step.current .step-number{background:var(--blue);box-shadow:0 7px 16px #0b61dc2b}.progress-step.current strong{color:#084eb3}.progress-line{height:2px;background:#d8e1ed;margin:0 10px}.page-heading{margin-bottom:12px}.page-heading h2{font-size:24px;margin:0 0 2px;letter-spacing:-.3px}.page-heading p{margin:0;color:var(--muted);font-size:13px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.card{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:16px 18px 16px;box-shadow:0 10px 28px #132b4e0a}.card-heading{display:flex;gap:12px;align-items:flex-start;margin-bottom:12px}.card-heading.compact{margin-bottom:14px}.section-icon{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;color:#0d5bc8;font-size:23px}.card-heading h3{margin:0;font-size:17px}.card-heading p{margin:4px 0 0;color:var(--muted);font-size:13px}.section-divider{height:1px;background:#e3eaf2;margin:22px 0 18px}label{display:block;font-size:12px;font-weight:700;margin:9px 0 4px;color:#17243a}label em{color:#d22d3d;font-style:normal}input,select,textarea{width:100%;border:1px solid #cbd8e8;border-radius:8px;background:#fff;color:#17243a;padding:8px 12px;outline:none;transition:.15s ease}input,select{height:38px}textarea{min-height:94px;resize:vertical;line-height:1.4}input:focus,select:focus,textarea:focus{border-color:#4a8ce5;box-shadow:0 0 0 3px #0b61dc12}.bad{border-color:var(--danger)!important;box-shadow:0 0 0 3px #bd2c3612!important}.field-error{display:none;margin:5px 0 0;color:var(--danger);font-size:11px}.bad + .field-error{display:block}.address-row{display:grid;grid-template-columns:1.3fr .7fr 1fr;gap:12px}.project-type-toggle{display:grid;grid-template-columns:1fr 1fr;gap:12px}.type-option{height:54px;border:1px solid #cbd8e8;border-radius:8px;background:#fff;color:#21324e;font-weight:700;cursor:pointer}.type-option span{margin-right:8px;font-size:20px}.type-option.selected{background:#edf5ff;border-color:#4389eb;color:#0a56c0;box-shadow:inset 0 0 0 1px #4389eb}.textarea-wrap{position:relative}.textarea-wrap textarea{padding-bottom:25px}.textarea-wrap span{position:absolute;right:9px;bottom:7px;color:#7b8799;font-size:10px}.page-actions{display:grid;grid-template-columns:minmax(280px,1fr) auto auto;gap:12px;align-items:center;margin-top:22px}.save-status{display:flex;gap:12px;align-items:center;background:#eef4fb;border-radius:10px;padding:12px 15px;color:#213656}.cloud-icon{font-size:25px;color:#1463cf}.save-status strong{display:block;font-size:13px}.save-status small{display:block;color:#708097;font-size:11px;margin-top:3px}.btn{border-radius:8px;border:1px solid #c9d6e6;background:#fff;height:42px;padding:0 22px;font-weight:700;cursor:pointer;color:#18304f}.btn.primary{min-width:260px;border-color:var(--blue);background:linear-gradient(180deg,#0c64df,#0a57c6);color:#fff;box-shadow:0 8px 20px #0b61dc24}.btn.primary:hover{background:#084fb6}.btn.secondary:hover{background:#f7f9fc}.btn span{margin-left:8px}.saved-flash{color:var(--success)!important}
@media(max-width:1100px){body{grid-template-columns:220px 1fr}.sidebar{padding-left:10px;padding-right:10px}.brand-copy strong{font-size:23px}.page-wrap{padding:22px 20px}.progress-step small{display:none}.topbar-meta{display:none}}
@media(max-width:850px){body{display:block}.sidebar{position:fixed;left:-270px;width:255px;transition:left .2s ease}.sidebar.open{left:0}.menu-toggle{display:block}.topbar{justify-content:flex-start;gap:14px;padding:0 18px}.form-grid{grid-template-columns:1fr}.progress{grid-template-columns:auto 1fr auto 1fr auto}.progress-step div{display:none}.page-actions{grid-template-columns:1fr 1fr}.save-status{grid-column:1/-1}.btn.primary{min-width:0}.page-wrap{padding:18px 14px}.page-heading h2{font-size:24px}}
@media(max-width:560px){.address-row{grid-template-columns:1fr 1fr}.address-row>div:first-child{grid-column:1/-1}.project-type-toggle{grid-template-columns:1fr}.page-actions{grid-template-columns:1fr}.btn{width:100%}.save-status{grid-column:auto}}

/* Products & Pricing */
.page-wrap-wide{max-width:1600px}
.page-heading-actions{display:flex;justify-content:space-between;align-items:end;gap:20px}
.heading-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.compact-btn{height:42px;padding:0 16px;font-size:13px}.muted-copy{color:var(--muted);font-weight:500}.strip-title{display:flex;align-items:center;gap:9px;font-size:15px}.project-strip-card{padding:16px 18px}.project-strip>div{border:1px solid #e1e8f1;border-radius:8px;padding:10px 12px;background:#fbfdff;min-width:0}.project-strip span{display:block;color:#66758c;font-size:10px;margin-bottom:4px}.project-strip strong{display:block;font-size:13px}.product-card{padding:0;margin-top:16px}.product-card-head{display:flex;justify-content:space-between;align-items:center;padding:13px 16px;border-bottom:1px solid #e5ebf3;gap:14px}.global-markup-control label{font-size:11px}.global-markup-control select{width:128px;height:36px;padding:6px 8px;font-size:12px}.small-action{height:36px;padding:0 13px;font-size:12px}.product-table{border-collapse:collapse}.product-table th{background:#f2f6fb;border-bottom:1px solid #dce5ef;padding:9px 5px;text-align:left;font-size:10px;line-height:1.15;white-space:normal;color:#233450}.product-table th span{font-weight:500;color:#728098}.product-table td{border-bottom:1px solid #edf1f6}.product-table tbody tr:last-child td{border-bottom:0}.product-table input,.product-table select{height:36px;padding:6px 7px;border-radius:6px;font-size:11px;min-width:0}.product-table .row-number{text-align:center}.money-cell{font-size:11px;font-weight:800;text-align:right;white-space:nowrap}.row-actions{display:flex;align-items:center}.duplicate-line,.delete-line{border:0;background:transparent;color:#60738d;font-size:15px;cursor:pointer;width:28px;height:30px;border-radius:5px;padding:0}.duplicate-line:hover{background:#edf5ff;color:#1e5fd8}.currency-input{text-align:right;font-variant-numeric:tabular-nums}.product-table-footer{padding:10px 12px;border-top:1px solid #e5ebf3;display:flex;justify-content:space-between;align-items:center;gap:12px}.save-inline{font-size:11px;color:#718097}.pricing-panels{display:grid;grid-template-columns:1fr 1fr 1.08fr;gap:16px;margin-top:16px}.summary-card,.quick-tools-card{padding:16px 18px}.summary-list{margin-top:12px}.summary-list>div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #eef2f6;font-size:12px}.summary-list>div:last-child{border-bottom:0}.highlight-row{background:#effbf3;margin:0 -8px;padding:9px 8px!important;border-radius:6px}.commission-rules{margin:13px 0 0;color:#718097;font-size:10px;line-height:1.45}.product-page-actions{grid-template-columns:auto 1fr auto auto}.action-spacer{min-width:20px}

@media(max-width:1350px){.page-wrap-wide{padding-left:16px;padding-right:16px}.product-table th{font-size:9px}.product-table input,.product-table select{font-size:10px;padding-left:5px;padding-right:5px}.heading-actions{gap:6px}.compact-btn{padding:0 11px}.project-strip{grid-template-columns:1fr 1.7fr 1fr 1fr 1fr 1fr}}
@media(max-width:1120px){.page-heading-actions{align-items:flex-start;flex-direction:column}.project-strip{grid-template-columns:repeat(3,1fr)}.pricing-panels{grid-template-columns:1fr}.product-table,.product-table tbody,.product-table tr,.product-table td{display:block}.product-table thead{display:none}.product-table colgroup{display:none}.product-table tbody{padding:10px}.product-table tr{border:1px solid #dce5ef;border-radius:10px;padding:10px;margin-bottom:10px;display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.product-table td{border:0;padding:0}.product-table td:nth-child(1){grid-column:1/-1;text-align:left}.product-table td:nth-child(9){grid-column:1/-1}.product-table td:nth-child(14){align-self:end}.product-table td:nth-child(15){align-self:end}.product-table td:before{display:block;font-size:9px;color:#728098;margin-bottom:3px}.product-table td:nth-child(2):before{content:'Location / Room'}.product-table td:nth-child(3):before{content:'Product Type'}.product-table td:nth-child(4):before{content:'Vendor'}.product-table td:nth-child(5):before{content:'Operation'}.product-table td:nth-child(6):before{content:'IB / OB'}.product-table td:nth-child(7):before{content:'Width'}.product-table td:nth-child(8):before{content:'Height'}.product-table td:nth-child(9):before{content:'Control Location'}.product-table td:nth-child(10):before{content:'Detailed Product Description'}.product-table td:nth-child(11):before{content:'Qty'}.product-table td:nth-child(12):before{content:'Actual Cost (ea)'}.product-table td:nth-child(13):before{content:'Markup %'}.product-table td:nth-child(14):before{content:'Selling Price (ea)'}.product-table td:nth-child(15):before{content:'Total'}.product-table input,.product-table select{font-size:12px}.product-page-actions{grid-template-columns:1fr 1fr}.product-page-actions .action-spacer{display:none}}
@media(max-width:650px){.project-strip{grid-template-columns:1fr}.heading-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.product-card-head{align-items:flex-start;flex-direction:column}.global-markup-control{width:100%;display:grid;grid-template-columns:1fr 1fr}.global-markup-control label{grid-column:1/-1}.global-markup-control select{width:100%}.product-page-actions{grid-template-columns:1fr}.product-page-actions .btn{width:100%}}


/* Installation Details */
.installation-heading{margin-bottom:12px}.installer-measurements-card{padding:0;overflow:hidden;margin-top:16px}.installer-card-head{display:flex;justify-content:space-between;align-items:center;padding:13px 16px;border-bottom:1px solid #e5ebf3;gap:14px}.installer-table-wrap{overflow:visible}.installer-table{width:100%;border-collapse:collapse;table-layout:fixed}.installer-table th{background:#f2f6fb;color:#233450;font-size:10px;text-align:left;padding:9px 7px;border-bottom:1px solid #dce5ef}.installer-table td{font-size:11px;padding:8px 7px;border-bottom:1px solid #edf1f6;vertical-align:top}.installer-table th:nth-child(1),.installer-table td:nth-child(1){width:34px;text-align:center}.installer-table th:nth-child(2){width:10%}.installer-table th:nth-child(3){width:10%}.installer-table th:nth-child(4){width:8%}.installer-table th:nth-child(5){width:6%}.installer-table th:nth-child(6),.installer-table th:nth-child(7){width:6%}.installer-table th:nth-child(8){width:9%}.installer-table th:nth-child(9){width:auto}.installer-table th:nth-child(10){width:5%}.installer-description{line-height:1.35}.empty-installer{text-align:center!important;color:#77869a;padding:22px!important}.installation-grid,.installation-notes-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}.checklist-card,.notes-card{padding:16px 18px}.check-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px 14px;margin-top:14px;align-items:center}.check-grid label{display:flex;align-items:center;gap:8px;margin:0;font-size:11px;font-weight:500;min-height:26px}.check-grid input[type=checkbox]{width:17px;height:17px;padding:0;margin:0;accent-color:#0b61dc}.check-grid .other-input{grid-column:span 2;height:34px;font-size:11px;margin:0}.notes-card textarea{margin-top:12px;min-height:96px;font-size:12px}.note-count{text-align:right;color:#77869a;font-size:10px;margin-top:5px}.installation-actions{grid-template-columns:auto 1fr auto auto auto}.installation-save-status{text-align:right;color:#728098;font-size:10px;margin-top:8px}
@media(max-width:1120px){.installation-grid,.installation-notes-grid{grid-template-columns:1fr}.installer-table-wrap{overflow-x:auto}.installer-table{min-width:980px}.installation-actions{grid-template-columns:1fr 1fr}.installation-actions .action-spacer{display:none}}
@media(max-width:650px){.check-grid{grid-template-columns:1fr 1fr}.installation-actions{grid-template-columns:1fr}.installation-actions .btn{width:100%}.installer-card-head{align-items:flex-start;flex-direction:column}}

/* Job number + estimate search refinements */
.installation-project-strip{grid-template-columns:1fr 1.15fr 2fr 1.1fr 1.1fr 1fr}
.estimate-search-card{padding:18px}.estimate-search-row{display:flex;gap:10px}.estimate-search-row input{flex:1}.estimates-table-wrap{margin-top:14px;overflow:auto}.estimates-table{width:100%;border-collapse:collapse}.estimates-table th{background:#f2f6fb;text-align:left;font-size:11px;padding:10px;border-bottom:1px solid #dce5ef}.estimates-table td{font-size:12px;padding:10px;border-bottom:1px solid #edf1f6}.empty-estimate{text-align:center;color:#728098;padding:24px!important}
@media(max-width:900px){.installation-project-strip{grid-template-columns:repeat(2,1fr)}.estimate-search-row{flex-direction:column}}

/* Appointment / system timestamps */
.date-time-grid{display:grid;grid-template-columns:1.25fr 1fr;gap:12px}.date-time-grid>div{min-width:0}.summary-currency-input{max-width:118px;height:32px!important;padding:5px 8px!important;text-align:right;font-size:11px!important}
@media(max-width:650px){.date-time-grid{grid-template-columns:1fr}}

/* Review & Finalize */
.review-heading{align-items:center}.review-status-badge{border:1px solid #d5dfeb;background:#f4f8fd;color:#5a6c84;border-radius:999px;padding:7px 14px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.review-status-badge.finalized{background:#eaf8ef;color:#207540;border-color:#c9ead4}.review-timing-card{padding:16px 18px}.timing-grid{display:grid;gap:10px;margin-top:12px}.timing-grid>div{border:1px solid #e1e8f1;border-radius:8px;padding:10px 12px;background:#fbfdff;min-width:0}.timing-grid span,.review-detail-grid span,.review-install-grid span{display:block;color:#6c7b90;font-size:9px;text-transform:uppercase;letter-spacing:.04em;margin-bottom:4px}.timing-grid strong{font-size:12px;overflow-wrap:anywhere}.timing-note{margin-top:10px;background:#f4f8fd;border:1px solid #e0e8f2;color:#617189;border-radius:7px;padding:8px 10px;font-size:10px}.review-grid-two{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}.review-card{padding:16px 18px}.review-card-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.text-action{border:0;background:transparent;color:#1764df;font-weight:700;font-size:11px;cursor:pointer}.review-detail-grid,.review-install-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;margin-top:14px}.review-detail-grid>div,.review-install-grid>div{min-width:0}.review-detail-grid strong{font-size:12px;overflow-wrap:anywhere}.normal-weight{font-weight:500!important;line-height:1.45}.span-two{grid-column:1/-1}.review-install-grid p{margin:0;font-size:11px;line-height:1.45;color:#26364f;white-space:pre-wrap}.review-products-card{padding:0;overflow:hidden;margin-top:16px}.review-products-card .review-card-head{padding:13px 16px;border-bottom:1px solid #e5ebf3}.review-table-wrap{overflow:auto}.review-products-table{width:100%;border-collapse:collapse}.review-products-table th{background:#f2f6fb;color:#233450;font-size:10px;text-align:left;padding:9px 8px;border-bottom:1px solid #dce5ef}.review-products-table td{font-size:11px;padding:9px 8px;border-bottom:1px solid #edf1f6}.review-products-table th:nth-last-child(-n+4),.review-products-table td:nth-last-child(-n+4){text-align:right;white-space:nowrap}.review-summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}.review-actions{grid-template-columns:auto 1fr auto auto auto}.finalize-message{margin-top:14px;border-radius:8px;padding:10px 12px;font-size:11px;font-weight:700}.finalize-message.success{background:#eaf8ef;border:1px solid #c9ead4;color:#207540}.finalize-message.error{background:#fff0f0;border:1px solid #f1cccc;color:#a22d35}.finalized-button{background:#5f7188!important;cursor:default!important;opacity:.85}
@media(max-width:1120px){.timing-grid{grid-template-columns:repeat(2,1fr)}.review-grid-two,.review-summary-grid{grid-template-columns:1fr}.review-actions{grid-template-columns:1fr 1fr}.review-actions .action-spacer{display:none}}
@media(max-width:650px){.timing-grid,.review-detail-grid,.review-install-grid{grid-template-columns:1fr}.review-actions{grid-template-columns:1fr}.review-actions .btn{width:100%}}

/* Customer-facing estimate fields on Page 1 */
.internal-label{display:inline-flex;align-items:center;margin-left:6px;padding:2px 6px;border-radius:999px;background:#eef2f7;color:#6e7d91;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;vertical-align:middle}.customer-estimate-fields{margin-top:20px;padding-top:18px;border-top:1px solid #e3eaf2}.customer-estimate-fields-head{display:flex;gap:10px;align-items:flex-start;margin-bottom:8px}.customer-estimate-fields-head h4{margin:1px 0 2px;font-size:14px;color:#17243a}.customer-estimate-fields-head p{margin:0;color:#718097;font-size:11px}.small-icon{width:28px;height:28px;font-size:17px}.custom-lead-time{margin-top:8px}.internal-review-label{display:inline-flex;margin-left:5px;padding:1px 5px;border-radius:999px;background:#eef2f7;color:#6f7d91;font-size:8px;font-weight:800;letter-spacing:.04em;vertical-align:middle}

/* Attachments + refined dropdowns */
.attachment-top-btn{border:1px solid #d6e0ec;background:#f8fbff;color:#183252;border-radius:7px;padding:7px 10px;font-size:11px;font-weight:700;cursor:pointer}.attachment-top-btn:hover{background:#edf5ff;border-color:#b8cce5}.attachment-modal[hidden]{display:none}.attachment-modal{position:fixed;inset:0;z-index:1000}.attachment-backdrop{position:absolute;inset:0;background:#091a3070}.attachment-panel{position:absolute;right:0;top:0;height:100%;width:min(520px,94vw);background:#fff;box-shadow:-18px 0 45px #091a3040;padding:20px;display:flex;flex-direction:column}.attachment-head{display:flex;justify-content:space-between;gap:18px;border-bottom:1px solid #e2e8f0;padding-bottom:14px}.attachment-head h3{margin:0 0 4px;font-size:20px}.attachment-head p{margin:0;color:#718097;font-size:11px}.attachment-close{border:0;background:transparent;font-size:30px;line-height:1;color:#586a83;cursor:pointer}.attachment-actions{display:flex;gap:8px;padding:14px 0;align-items:center;flex-wrap:wrap}.attachment-actions .btn,.attachment-actions .attachment-upload-label{height:36px;min-height:36px;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;margin:0}.attachment-upload-label{cursor:pointer}.attachment-list{overflow:auto;flex:1;border-top:1px solid #eef2f6}.attachment-item{display:grid;grid-template-columns:34px 1fr auto auto;gap:9px;align-items:center;padding:11px 2px;border-bottom:1px solid #eef2f6}.attachment-icon{font-size:20px;text-align:center}.attachment-info strong{display:block;font-size:12px;overflow-wrap:anywhere}.attachment-info small{display:block;font-size:10px;color:#7a8799;margin-top:3px}.attachment-view,.attachment-delete{border:0;background:transparent;font-size:11px;font-weight:700;cursor:pointer}.attachment-view{color:#1764df}.attachment-delete{color:#ad3540}.attachment-empty{padding:26px 4px;color:#718097;font-size:12px;text-align:center}.attachment-foot{padding-top:14px;border-top:1px solid #e6ecf3;display:flex;justify-content:flex-end}.line-attachment{position:relative;border:0;background:transparent;color:#516985;font-size:15px;cursor:pointer;width:30px;height:30px;border-radius:5px;padding:0}.line-attachment:hover,.line-attachment.has-attachments{background:#edf5ff;color:#125fd3}.line-attachment-count{position:absolute;right:1px;top:-2px;background:#0b61dc;color:#fff;border-radius:999px;min-width:14px;height:14px;font-size:8px;display:grid;place-items:center}.line-attachment-count:empty{display:none}.timing-grid{grid-template-columns:1fr 1.35fr 1fr 1fr}
@media(max-width:800px){.attachment-top-btn{font-size:0;padding:8px}.attachment-top-btn::before{content:'📎';font-size:16px}.attachment-top-btn span{font-size:10px;margin-left:2px}.timing-grid{grid-template-columns:1fr 1fr}}
/* Consolidated office-testing update */
.progress a{color:inherit;text-decoration:none}.progress-step{min-width:0}.estimates-table td small{display:block;color:#667085;margin-top:3px}.empty-mini{padding:24px;color:#667085}.table-link{border:0;background:none;color:#155faa;font-weight:700;cursor:pointer;padding:3px}.table-link.danger{color:#b42318}.status-pill{display:inline-block;padding:4px 9px;border-radius:999px;font-weight:700;font-size:12px;background:#eef2f6}.status-pending{background:#fff4cc;color:#7a5a00}.status-sold{background:#e6f7ee;color:#067647}.status-lost{background:#feeceb;color:#b42318}.quick-current{display:grid;grid-template-columns:1fr auto;gap:3px 12px;border-bottom:1px solid #e8ebef;margin-bottom:10px}.quick-current strong{font-size:20px;color:#17365d}.quick-current small{grid-column:1/-1;color:#667085}.attachment-top-btn{white-space:nowrap}
@media(max-width:900px){.progress{overflow-x:auto}.progress-step{min-width:190px}}

/* Home dashboard visual refresh */
.home-topbar{justify-content:space-between;min-height:58px}.home-topbar-right{margin-left:auto;display:flex;align-items:center;gap:12px;color:#17365d;font-size:13px}.home-user-dot{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#155faa;color:#fff;font-weight:800}.home-dashboard{padding:0 24px 28px;background:linear-gradient(180deg,#f8fbff 0%,#eef5fc 100%);min-height:calc(100vh - 58px)}
.home-hero-v2{position:relative;min-height:150px;margin:0 -24px 0;display:grid;grid-template-columns:minmax(520px,44%) 1fr;overflow:hidden;background:#fff}.home-hero-copy{position:relative;z-index:2;padding:22px 0 18px 28px;background:linear-gradient(90deg,#fff 0%,#fff 72%,rgba(255,255,255,.92) 87%,rgba(255,255,255,0) 100%)}.home-hero-copy h1{margin:0;color:#0f3f77;font-size:34px;line-height:1.05;letter-spacing:-1.2px}.home-hero-copy p{margin:4px 0 14px;color:#1668bd;font-size:20px;font-weight:500}.home-create-btn{font-size:17px;padding:14px 26px;box-shadow:0 8px 22px rgba(21,95,170,.18)}.home-hero-photo{position:absolute;right:0;top:0;bottom:0;width:64%;background-image:linear-gradient(90deg,rgba(255,255,255,.92),rgba(255,255,255,0) 28%),url('home-hero.png');background-size:cover;background-position:center right}
.home-kpi-grid{
  position:relative;
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.home-kpi-card{
  min-height:108px;
  background:#fff;
  border:1px solid #dfe8f3;
  border-radius:11px;
  box-shadow:0 4px 14px rgba(31,67,105,.05);
  display:grid;
  grid-template-columns:48px 1fr auto;
  align-items:center;
  gap:10px;
  padding:13px 16px;
  text-decoration:none;
  color:#132f52;
}

.home-kpi-card>div:nth-child(2){
  min-width:0;
}

.home-kpi-card span{
  display:block;
  font-weight:700;
  font-size:14px;
  line-height:1.2;
}

.home-kpi-card strong{
  display:block;
  color:#0f4f94;
  font-size:28px;
  line-height:1.1;
  margin-top:5px;
}

.home-kpi-card>b{
  font-size:27px;
  color:#1671c9;
  font-weight:400;
}

.home-kpi-icon{
  width:44px;
  height:44px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#edf6ff;
  color:#1268b7;
  font-size:21px;
  font-weight:800;
}

.closing-card{
  grid-template-columns:44px 1fr;
}

.closing-content small{
  display:block;
  color:#586f88;
  margin-top:1px;
  font-size:11px;
}

.closing-content strong{
  margin:2px 0 5px;
}

.period-buttons{
  display:flex;
  gap:4px;
}

.period-buttons button{
  border:0;
  border-radius:5px;
  background:#eef4fa;
  color:#31506f;
  padding:4px 8px;
  cursor:pointer;
  font-size:12px;
}

.period-buttons button.active{
  background:#155faa;
  color:#fff;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.home-pending-card{
  margin-top:12px;
  overflow:hidden;
  padding:0;
}.home-section-head{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-bottom:1px solid #e1e8f0}
.home-section-head h2{margin:0;color:#0f4f94;font-size:20px}
.home-section-head a{color:#1268b7;font-weight:700;text-decoration:none}
.home-estimates-table th{background:#f1f6fb;color:#415b76;font-size:12px}
.home-estimates-table td{font-size:13px}
.home-row-open{border:0;background:none;color:#1268b7;font-size:26px;cursor:pointer;line-height:1}
.home-estimates-table tbody tr:hover{background:#f8fbff}
.home-bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}
.home-list-card{overflow:hidden;padding:0;}
.home-list-row{
  width:100%;
  display:grid;
  grid-template-columns:minmax(170px,1.4fr) minmax(115px,.9fr) 95px 76px 18px;
  align-items:center;
  gap:10px;
  padding:9px 14px;
  border:0;
  border-bottom:1px solid #edf1f5;
  background:#fff;
  text-align:left;
  cursor:pointer;
}.home-list-row:hover{background:#f7fbff}.home-list-row>span:first-child{min-width:0;display:flex;flex-direction:column}.home-list-row strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.home-list-row small{color:#6b7f93}.home-list-meta{font-size:12px;color:#3d5874}.home-list-meta small{display:block}.home-list-money{font-weight:700;color:#17365d}.home-list-row>b{font-size:22px;color:#1268b7}.home-list-row .status-pill{text-align:center}
@media(max-width:1150px){.home-kpi-grid{grid-template-columns:repeat(2,1fr)}.home-hero-v2{grid-template-columns:1fr}.home-hero-photo{width:58%;opacity:.78}.home-hero-copy{padding-right:25%;}.home-bottom-grid{grid-template-columns:1fr}.home-list-row{grid-template-columns:minmax(170px,1.4fr) 120px 90px 70px 18px}}
@media(max-width:760px){.home-dashboard{padding:0 12px 20px}.home-hero-v2{margin:0 -12px;min-height:260px}.home-hero-copy{padding:28px 18px;background:linear-gradient(90deg,#fff 0%,rgba(255,255,255,.95) 72%,rgba(255,255,255,.72) 100%)}.home-hero-copy h1{font-size:36px}.home-hero-copy p{font-size:23px}.home-hero-photo{width:100%;opacity:.35}.home-kpi-grid{grid-template-columns:1fr}.home-list-row{grid-template-columns:1fr auto}.home-list-row .home-list-meta,.home-list-row .home-list-money,.home-list-row .status-pill{display:none}.home-topbar-right #homeDate{display:none}}

/* Project-type behavior: commission is residential-sales-only. Commercial estimates retain all pricing/markup tools. */


/* Landed-cost and commission reconciliation update */
.info-dot{display:inline-grid;place-items:center;width:17px;height:17px;border-radius:50%;border:1px solid #7e9abb;background:#fff;color:#155faa;font-size:10px;font-weight:800;cursor:pointer;padding:0;vertical-align:middle}.info-dot:hover{background:#edf6ff}.reconciliation-card{margin-top:16px;padding:16px 18px}.admin-only-badge{display:inline-block;margin-left:8px;padding:3px 7px;border-radius:999px;background:#edf5ff;color:#155faa;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.reconciliation-head-actions{display:flex;gap:8px;flex-wrap:wrap}.reconciliation-intro{margin:10px 0 0;color:#617189;font-size:11px;line-height:1.5}.reconciliation-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:15px 0}.reconciliation-summary>div{border:1px solid #dde7f1;background:#f8fbff;border-radius:8px;padding:10px 12px}.reconciliation-summary span{display:block;color:#6b7c91;font-size:9px;text-transform:uppercase;letter-spacing:.03em}.reconciliation-summary strong{display:block;color:#17365d;font-size:16px;margin-top:4px}.reconciliation-summary .recon-locked{background:#eef9f2;border-color:#cde9d5}.reconciliation-summary small{display:block;color:#6d7f90;margin-top:3px}.reconciliation-table-wrap{overflow:auto;border:1px solid #e1e8f0;border-radius:9px}.reconciliation-table{width:100%;border-collapse:collapse;min-width:1180px}.reconciliation-table th{background:#f2f6fb;color:#334d68;font-size:9px;padding:8px 7px;text-align:left;border-bottom:1px solid #dce5ef}.reconciliation-table td{font-size:10px;padding:7px;border-bottom:1px solid #edf1f6;vertical-align:middle}.reconciliation-table td small{display:block;color:#718097;margin-top:2px}.recon-money{width:105px;height:32px!important;padding:5px 7px!important;text-align:right;font-size:10px!important}.verify-check{display:flex;align-items:center;gap:5px;font-size:10px;white-space:nowrap}.reconciliation-footer{display:flex;justify-content:flex-end;align-items:center;gap:14px;margin-top:12px}.verification-progress{margin-right:auto;color:#617189;font-size:11px}.reconciliation-footer .btn:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:900px){.reconciliation-summary{grid-template-columns:1fr 1fr}.reconciliation-head-actions{width:100%}.reconciliation-card .review-card-head{align-items:flex-start;flex-direction:column}}
@media(max-width:600px){.reconciliation-summary{grid-template-columns:1fr}.reconciliation-footer{align-items:stretch;flex-direction:column}.verification-progress{margin-right:0}.reconciliation-footer .btn{width:100%}}

/* Financial package: tax controls */
.product-table .c-taxable{width:70px}.product-table select[aria-label="Taxable"]{min-width:64px}
.charge-tax-controls{display:flex;align-items:center;gap:8px}.charge-tax-controls select,.summary-select{min-width:112px;border:1px solid #cbd5e1;border-radius:7px;padding:7px 9px;background:#fff;color:#0f2747;font:inherit}.charge-tax-controls .summary-currency-input{min-width:105px}
@media(max-width:760px){.charge-tax-controls{flex-wrap:wrap;justify-content:flex-end}.charge-tax-controls select{min-width:105px}}

/* V1 sidebar branding refresh */
.brand.brand-logo-link{display:block;padding:4px 10px 22px;text-align:center}
.brand-logo{display:block;width:100%;max-width:215px;height:auto;margin:0 auto;object-fit:contain;filter:drop-shadow(0 2px 3px rgba(0,0,0,.2))}
@media(max-width:1100px){.brand-logo{max-width:185px}.brand.brand-logo-link{padding-left:6px;padding-right:6px}}


/* 2026-09-19 workflow and pricing refinement */
.markup-entry{width:86px;min-height:36px;border:1px solid #cbd5e1;border-radius:7px;padding:6px 9px;background:#fff;color:#17365d;font-weight:700;text-align:right}.product-table .markup-entry{width:76px;min-width:70px;height:34px}.pricing-scenario{border:1px solid #dce5ef;border-radius:10px;background:#fbfdff;padding:12px}.scenario-head{justify-content:space-between;border-bottom:1px solid #e5ecf4}.scenario-head label{font-weight:800;color:#17365d}.scenario-line{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #edf2f7;align-items:center}.scenario-line span{color:#617189;font-size:11px}.scenario-line strong{font-size:15px;color:#17365d;text-align:right}.commission-line strong{font-size:18px;color:#155faa}.target-scenario.below-target{border-color:#e7b353;background:#fffaf0}.target-scenario.below-target .commission-line strong{color:#b66a00}.under-target-warning{margin-top:10px;padding:10px;border:1px solid #f1c36d;background:#fff8e8;border-radius:8px;color:#8a5400;display:grid;gap:4px}.under-target-warning[hidden]{display:none}.under-target-warning strong{font-size:12px}.under-target-warning span{font-size:11px}.alternative-scenario.is-top-tier{border-color:#b7dfc3;background:#f6fcf8}.alternative-scenario.is-top-tier .alt-commission-line strong,.alternative-scenario.is-top-tier .potential-earnings{color:#16743a}.potential-earnings{margin-top:10px;border-radius:8px;padding:10px;background:#f2f6fa;display:flex;justify-content:space-between;align-items:center;gap:12px;color:#17365d;font-weight:800}.alternative-scenario.is-top-tier .potential-earnings{background:#edf8f1;color:#16743a}.potential-earnings strong{font-size:18px}.customer-name-search{position:relative}.customer-suggestions{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 4px);background:#fff;border:1px solid #cad7e6;border-radius:8px;box-shadow:0 10px 24px rgba(19,49,84,.14);max-height:260px;overflow:auto}.customer-suggestion{width:100%;border:0;border-bottom:1px solid #edf1f5;background:#fff;padding:10px 12px;text-align:left;cursor:pointer}.customer-suggestion:hover{background:#f5f9fd}.customer-suggestion strong,.customer-suggestion small{display:block}.customer-suggestion small{color:#6c7f92;margin-top:2px}.existing-customer-panel{margin-top:10px;border:1px solid #cfe0f2;background:#f7fbff;border-radius:9px;padding:12px}.existing-customer-panel h4{margin:0 0 4px;color:#174a80}.existing-customer-panel p{margin:0 0 10px;color:#617189;font-size:11px}.customer-action-row{display:flex;gap:8px;flex-wrap:wrap}.customer-history-list{margin-top:10px;display:grid;gap:6px}.customer-history-item{border:1px solid #dce5ef;border-radius:7px;background:#fff;padding:8px;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}.customer-history-item small{display:block;color:#6d7d91}.customer-directory-search{display:flex;gap:10px;align-items:center}.customer-directory-search input{flex:1}.customer-directory-results{margin-top:14px;display:grid;gap:10px}.customer-directory-card{border:1px solid #dce5ef;border-radius:10px;background:#fff;padding:14px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}.customer-directory-card h3{margin:0;color:#174a80}.customer-directory-card p{margin:3px 0;color:#617189;font-size:11px}.customer-directory-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.alternate-badge{display:inline-block;padding:2px 6px;border-radius:999px;background:#edf5ff;color:#155faa;font-size:9px;font-weight:800}.progress-step.locked-ahead{opacity:.7}


/* 2026-09-20 customer preview button */
#customerPreviewBtn:not(:disabled){border-color:#8eb6e8;background:#f5f9ff;color:#145ebd}
#customerPreviewBtn:not(:disabled):hover{background:#eaf3ff}

/* 2026-09-20 below-recommended-markup confirmation */

.markup-warning-modal[hidden]{display:none}
.markup-warning-modal{position:fixed;inset:0;z-index:1400;display:grid;place-items:center;padding:20px}
.markup-warning-backdrop{position:absolute;inset:0;background:rgba(7,24,44,.62);backdrop-filter:blur(2px)}
.markup-warning-dialog{position:relative;width:min(560px,96vw);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border:1px solid #dce5ef;border-radius:16px;box-shadow:0 24px 70px rgba(4,22,48,.32);padding:24px}
.markup-warning-icon{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#fff3d6;color:#9a6200;border:1px solid #efc76f;font-size:25px;font-weight:900;margin-bottom:14px}
.markup-warning-copy h3{margin:0;color:#17365d;font-size:22px}
.markup-warning-copy>p{color:#5e7087;font-size:13px;line-height:1.5}
.markup-warning-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:17px 0 10px}
.markup-warning-stats>div{border:1px solid #dce5ef;background:#f8fbff;border-radius:9px;padding:11px 12px;min-width:0}
.markup-warning-stats span,.markup-warning-gain span{display:block;color:#687b91;font-size:10px;text-transform:uppercase;letter-spacing:.035em;line-height:1.35}
.markup-warning-stats strong{display:block;color:#17365d;font-size:18px;margin-top:5px}
.markup-warning-gain{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid #bfe0ca;background:#eef9f2;border-radius:9px;padding:12px 14px;margin-bottom:14px}
.markup-warning-gain strong{color:#16743a;font-size:21px;white-space:nowrap}
.markup-warning-question{font-weight:700;color:#243b59!important;margin-bottom:0}
.markup-warning-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}
.markup-warning-actions .btn{width:100%;min-width:0;height:46px;padding:0 14px}
@media(max-width:560px){.markup-warning-dialog{padding:18px}.markup-warning-stats{grid-template-columns:1fr}.markup-warning-actions{grid-template-columns:1fr}.markup-warning-copy h3{font-size:20px}}

/* Final UI polish: below-target markup emphasis + manual Global Markup field */
.quick-current{border:1px solid transparent;border-radius:10px;padding:10px 12px 14px;transition:background .18s ease,border-color .18s ease,box-shadow .18s ease}
.quick-current.markup-warning{background:#fff8e6;border-color:#e8bc5b;box-shadow:0 0 0 2px rgba(232,188,91,.10)}
.quick-current.markup-warning span,.quick-current.markup-warning small{color:#855700}
.quick-current.markup-warning strong{color:#a56500}
.quick-current.markup-danger{background:#fff1f1;border-color:#e19a9f;box-shadow:0 0 0 2px rgba(193,50,61,.08)}
.quick-current.markup-danger span,.quick-current.markup-danger small{color:#8f3339}
.quick-current.markup-danger strong{color:#b4232f}
.global-markup-entry::-webkit-outer-spin-button,.global-markup-entry::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.global-markup-entry{-moz-appearance:textfield;appearance:textfield}

/* Small-iPad Installation Details table refinement - 2026-09-19 */
.installer-table th:nth-child(2),.installer-table td:nth-child(2){width:10%}
.installer-table th:nth-child(3),.installer-table td:nth-child(3){width:10%}
.installer-table th:nth-child(4),.installer-table td:nth-child(4){width:8%}
.installer-table th:nth-child(5),.installer-table td:nth-child(5){width:7%}
.installer-table th:nth-child(6),.installer-table td:nth-child(6){width:6%}
.installer-table th:nth-child(7),.installer-table td:nth-child(7){width:6%}
.installer-table th:nth-child(8),.installer-table td:nth-child(8){width:6%}
.installer-table th:nth-child(9),.installer-table td:nth-child(9){width:8%}
.installer-table th:nth-child(10),.installer-table td:nth-child(10){width:28%}
.installer-table th:nth-child(11),.installer-table td:nth-child(11){width:5%;text-align:center}
.installer-description{min-width:250px;overflow-wrap:normal;word-break:normal;white-space:normal}
@media (max-width:1120px){
  .installer-table-wrap{-webkit-overflow-scrolling:touch;overflow-x:auto}
  .installer-table{min-width:1120px}
  .installer-description{min-width:280px}
}
/* Product / landed cost display */




/* Admin — Users & Permissions */
.admin-page{padding-top:24px}
.admin-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:18px}
.admin-heading h2{margin:0 0 5px;font-size:29px}
.admin-heading p{margin:0;color:var(--muted)}
.admin-status{font-size:12px;color:#617189;background:#eef4fb;border-radius:8px;padding:9px 12px}
.admin-status.error{background:#fff0f0;color:#a22d35}
.admin-status.success{background:#eaf8ef;color:#207540}
.admin-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:16px;align-items:start}
.admin-user-list{padding:0;overflow:hidden}
.admin-user-list-head{padding:16px 18px;border-bottom:1px solid #e5ebf3}
.admin-user-list-head h3{margin:0;font-size:18px}
.admin-user-list-head p{margin:4px 0 0;color:var(--muted);font-size:11px}
.admin-user-row{width:100%;border:0;border-bottom:1px solid #edf1f6;background:#fff;padding:13px 16px;text-align:left;cursor:pointer;display:grid;grid-template-columns:38px 1fr auto;gap:10px;align-items:center}
.admin-user-row:hover{background:#f7fbff}
.admin-user-row.active{background:#edf5ff;box-shadow:inset 3px 0 0 var(--blue)}
.admin-user-avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#eaf2fb;color:#155faa;font-weight:800}
.admin-user-row strong{display:block;font-size:13px}
.admin-user-row small{display:block;color:#718097;font-size:10px;margin-top:3px}
.admin-user-state{font-size:9px;font-weight:800;border-radius:999px;padding:4px 7px;background:#eaf8ef;color:#207540}
.admin-user-state.inactive{background:#eef1f5;color:#69788a}
.admin-editor{padding:20px}
.admin-editor-empty{padding:50px 20px;text-align:center;color:#718097}
.admin-editor-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding-bottom:17px;border-bottom:1px solid #e5ebf3}
.admin-editor-head h3{margin:0;font-size:21px}
.admin-editor-head p{margin:4px 0 0;color:#718097;font-size:11px}
.admin-active-control{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:700;margin:0}
.admin-active-control input{width:18px;height:18px}
.admin-role-row{display:grid;grid-template-columns:180px minmax(220px,420px);gap:16px;align-items:center;padding:18px 0;border-bottom:1px solid #edf1f6}
.admin-role-row label{margin:0}
.admin-permissions-head{margin:20px 0 10px}
.admin-permissions-head h4{margin:0;font-size:16px}
.admin-permissions-head p{margin:4px 0 0;color:#718097;font-size:11px}
.permission-grid{display:grid;gap:8px}
.permission-row{display:grid;grid-template-columns:minmax(220px,1fr) 155px 165px;gap:12px;align-items:center;border:1px solid #e1e8f1;border-radius:9px;padding:11px 12px;background:#fbfdff}
.permission-copy strong{display:block;font-size:12px}
.permission-copy small{display:block;color:#718097;font-size:10px;margin-top:3px;line-height:1.35}
.permission-default{font-size:10px;color:#617189}
.permission-default b{color:#17365d}
.permission-select{height:36px;font-size:11px;padding:5px 8px}
.permission-select.override-on{border-color:#8bc9a1;background:#f1fbf4}
.permission-select.override-off{border-color:#e1a4aa;background:#fff5f5}
.admin-section-label{margin:18px 0 8px;font-size:11px;font-weight:800;color:#516985;text-transform:uppercase;letter-spacing:.05em}
.admin-loading{padding:28px;text-align:center;color:#718097}
.admin-denied{max-width:650px;margin:50px auto;padding:28px;text-align:center}
.admin-denied h2{margin-top:0;color:#a22d35}
@media(max-width:1000px){
  .admin-layout{grid-template-columns:1fr}
  .admin-user-list{max-height:300px;overflow:auto}
  .permission-row{grid-template-columns:1fr 150px}
  .permission-default{grid-column:1}
  .permission-select{grid-column:2;grid-row:1/3}
  .admin-role-row{grid-template-columns:1fr}
}
@media(max-width:650px){
  .admin-heading{flex-direction:column}
  .permission-row{grid-template-columns:1fr}
  .permission-default,.permission-select{grid-column:auto;grid-row:auto}
  .admin-editor-head{flex-direction:column}
}
/* Permission-driven Products layout */
@media (min-width:900px){

  .pricing-panels-refined.commission-hidden{
    grid-template-columns:
      minmax(0,1.45fr)
      minmax(330px,.85fr) !important;
  }

  .pricing-panels-refined.commission-hidden
  .quick-tools-card{
    grid-column:1;
    grid-row:1;
  }

  .pricing-panels-refined.commission-hidden
  .pricing-summary-sidebar{
    grid-column:2;
    grid-row:1;
  }
}

/* Permission-driven Home dashboard */
.home-kpi-card[hidden]{
  display:none !important;
}

.home-kpis-financial-hidden .home-kpi-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.hide-home-commission .home-estimates-table th:nth-child(6),
.hide-home-commission .home-estimates-table td:nth-child(6){
  display:none;
}

@media(max-width:760px){
  .home-kpis-financial-hidden .home-kpi-grid{
    grid-template-columns:1fr;
  }
}

/* 2026-09-21 product-row polish: roomy actions + auto-growing descriptions */


.product-table td:last-child{
  padding-left:8px;
  padding-right:10px;
}

.row-actions{
  gap:5px;
  justify-content:center;
}

.line-attachment,
.duplicate-line,
.delete-line{
  width:32px;
  height:32px;
  font-size:18px;
  line-height:1;
  display:inline-grid;
  place-items:center;
}

.delete-line{
  color:#d92d20;
}

.delete-line:hover{
  background:#fff1f1;
  color:#b42318;
}

.product-description-input{
  width:100%;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  border:1px solid #cbd8e8;
  border-radius:6px;
  background:#fff;
  color:#17243a;
  font-size:11px;
}

.product-description-input:focus{
  border-color:#4a8ce5;
  box-shadow:0 0 0 3px #0b61dc12;
  outline:none;
}

@media(max-width:1120px){
  .product-description-input{
    min-height:42px;
    font-size:12px;
  }
}
/* Base Navigation Links */
a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #4a5568;             /* Clean dark-gray text */
    text-decoration: none;
    border-radius: 8px;         /* Smooth rounded corners */
    margin-bottom: 4px;
    font-family: sans-serif;
    
    /* Crucial for smooth animation: animates background, text color, and transforms */
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

/* Icon Spacing & Animation Setup */
.nav-icon {
    font-size: 1.25rem;         /* Slightly bigger size as requested */
    margin-right: 12px;
    display: inline-block;
    transition: transform 0.2s ease; /* Makes the icon move smoothly on hover */
}

/* Smooth Hover State (Only applies to active/clickable links) */
a:not(.disabled):hover {
    background-color: #f7fafc;  /* Soft, light gray background fade */
    color: #1a202c;             /* Text darkens slightly */
}

/* Extra pop: Micro-interaction that nudges the icon on hover */
a:not(.disabled):hover .nav-icon {
    transform: scale(1.1) translateY(-1px); 
}

/* Active State (e.g., your New Estimate link) */
a.active {
    background-color: #e2e8f0;  /* Distinct background color */
    color: #000000;
    font-weight: 600;
}

/* Disabled State Rules */
a.disabled {
    pointer-events: none;       /* Blocks clicks */
    opacity: 0.4;               /* Fades out completely */
    cursor: not-allowed;
}



/* PROJECT INFORMATION 8-FIELD LAYOUT START */

.project-strip{
  display:grid;
  grid-template-columns:
    .65fr
    1.05fr
    .72fr
    1.15fr
    1.65fr
    .9fr
    1fr
    1.2fr;
  gap:10px;
  margin-top:12px;
}

.project-strip > div{
  min-width:0;
}

.project-strip strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Medium desktop / smaller laptop */
@media(max-width:1450px){

  .project-strip{
    grid-template-columns:
      .7fr
      1fr
      .75fr
      1.15fr
      1.55fr
      .9fr
      1fr
      1.15fr;
    gap:8px;
  }

  .project-strip > div{
    padding:9px 10px;
  }

}

/* iPad / narrow desktop */
@media(max-width:1180px){

  .project-strip{
    grid-template-columns:
      repeat(4,1fr);
  }

}

/* Small tablet */
@media(max-width:800px){

  .project-strip{
    grid-template-columns:
      repeat(2,1fr);
  }

}

/* Phone */
@media(max-width:520px){

  .project-strip{
    grid-template-columns:
      1fr;
  }

}

/* PROJECT INFORMATION 8-FIELD LAYOUT END */

/* LOST ESTIMATE MODAL START */

body.modal-open{
  overflow:hidden;
}

.lost-estimate-modal[hidden]{
  display:none;
}

.lost-estimate-modal{
  position:fixed;
  inset:0;
  z-index:1200;
}

.lost-estimate-backdrop{
  position:absolute;
  inset:0;
  background:rgba(9,26,48,.52);
  backdrop-filter:blur(2px);
}

.lost-estimate-dialog{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:min(560px,calc(100vw - 32px));
  max-height:calc(100vh - 40px);
  overflow:auto;
  background:#fff;
  border-radius:14px;
  box-shadow:0 24px 70px rgba(9,26,48,.28);
}

.lost-estimate-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  border-bottom:1px solid #e5ebf3;
}

.lost-estimate-head h2{
  margin:0;
  color:#17243a;
}

.lost-estimate-head p{
  margin:5px 0 0;
  color:#687a90;
}

.lost-estimate-close{
  border:0;
  background:transparent;
  color:#60738d;
  line-height:1;
  cursor:pointer;
  padding:0 4px;
}

.lost-reason-list{
  display:grid;
}

.lost-reason-option{
  width:100%;
  display:flex;
  align-items:center;
  border:1px solid #dce5ef;
  background:#fff;
  color:#26364f;
  text-align:left;
  font-weight:700;
  cursor:pointer;
}

.lost-reason-option:hover{
  background:#f7fbff;
  border-color:#b9d1ec;
}

.lost-reason-option.selected{
  border-color:#1764df;
  background:#edf5ff;
  color:#114f9e;
  box-shadow:inset 0 0 0 1px #1764df;
}

.lost-reason-radio{
  border-radius:50%;
  border:2px solid #a6b5c8;
  background:#fff;
  flex:0 0 auto;
}

.lost-reason-option.selected
.lost-reason-radio{
  border:5px solid #1764df;
}

.lost-reason-loading{
  padding:16px;
  color:#718097;
  text-align:center;
  font-size:12px;
}



.lost-notes-field label{
  margin:0 0 7px;
}

.lost-notes-field label span{
  display:block;
  margin-top:2px;
  font-size:9px;
  font-weight:500;
  color:#7a8799;
}



.lost-estimate-error{
  margin-top:12px;
  padding:9px 11px;
  border:1px solid #f0c8cc;
  border-radius:8px;
  background:#fff1f2;
  color:#a22d35;
  font-size:11px;
  font-weight:700;
}

.lost-estimate-actions{
  display:flex;
  justify-content:flex-end;
  border-top:1px solid #e5ebf3;
}





@media(max-width:560px){

  .lost-estimate-dialog{
    width:calc(100vw - 20px);
    padding:17px;
  }

  .lost-estimate-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }

  .lost-estimate-actions .btn{
    width:100%;
    min-width:0;
  }

}

/* LOST ESTIMATE MODAL END */

/* COMPACT LOST MODAL OVERRIDES START */

.lost-estimate-dialog{
  width:min(500px,calc(100vw - 32px));
  padding:18px;
}

.lost-estimate-head{
  gap:14px;
  padding-bottom:12px;
}

.lost-estimate-head h2{
  font-size:19px;
}

.lost-estimate-head p{
  font-size:11px;
  margin-top:3px;
}

.lost-estimate-close{
  font-size:26px;
}

.lost-reason-list{
  gap:6px;
  margin-top:14px;
}

.lost-reason-option{
  gap:9px;
  padding:8px 10px;
  font-size:12px;
  border-radius:7px;
}

.lost-reason-radio{
  width:15px;
  height:15px;
}

.lost-reason-option.selected
.lost-reason-radio{
  border-width:4px;
}

.lost-notes-field{
  margin-top:14px;
}

.lost-notes-field label{
  font-size:11px;
  margin-bottom:5px;
}

.lost-notes-field textarea{
  min-height:68px;
  font-size:11px;
  padding:8px 10px;
}

.lost-estimate-actions{
  margin-top:15px;
  padding-top:12px;
  gap:8px;
}

.lost-estimate-actions .btn{
  height:38px;
  min-width:105px;
  font-size:12px;
  padding:0 16px;
}

.lost-estimate-actions .btn.primary{
  min-width:115px;
}

/* COMPACT LOST MODAL OVERRIDES END */
/* =========================================
   ESTIMATE ACTION BUTTONS
   ========================================= */

.estimate-action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.estimate-action-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 11px;
  min-height: 34px;

  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;

  cursor: pointer;
  white-space: nowrap;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease;
}

.estimate-action-btn:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.estimate-action-btn:active {
  transform: translateY(1px);
}


/* Open */

.estimate-action-primary {
  background: #155faa;
  border-color: #155faa;
  color: #ffffff;
}

.estimate-action-primary:hover {
  background: #104f90;
  border-color: #104f90;
}


/* Revise / Create Option */

.estimate-action-secondary {
  background: #ffffff;
  border-color: #c8d0d8;
  color: #2d3742;
}

.estimate-action-secondary:hover {
  background: #f3f5f7;
  border-color: #aeb8c2;
}


/* Mark Provided / Mark Sold */

.estimate-action-success {
  background: #217a46;
  border-color: #217a46;
  color: #ffffff;
}

.estimate-action-success:hover {
  background: #19633a;
  border-color: #19633a;
}


/* Mark Lost */

.estimate-action-danger {
  background: #ffffff;
  border-color: #c43d3d;
  color: #a92d2d;
}

.estimate-action-danger:hover {
  background: #fff2f2;
  border-color: #a92d2d;
}


/* Sold / Lost information shown beside Open */

.estimate-action-status {
  font-size: 12px;
  color: #59636e;
  white-space: nowrap;
}
.estimate-action-status-lost {
  color: #9a3434;
}

/* =========================================================
   PRODUCTS & PRICING — CONSOLIDATED RESPONSIVE LAYOUT
   2026-09-24 FINAL REPLACEMENT
   ========================================================= */

/* Product table: protect usable controls on wide screens. */

.product-table-wrap{overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}

.product-table input,.product-table select,.product-description-input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;height:36px;min-height:36px;margin:0;vertical-align:middle}
.product-description-input{display:block;resize:none;overflow:hidden}

.product-table col.c-num{width:36px}
.product-table col.c-room{width:112px}
.product-table col.c-product{width:112px}
.product-table col.c-vendor{width:86px}
.product-table col.c-operation{width:100px}
.product-table col.c-mount{width:64px}
.product-table col.c-dim{width:70px}
.product-table col.c-control{width:96px}
.product-table col.c-desc{width:190px}
.product-table col.c-qty{width:62px}
.product-table col.c-taxable{width:82px}
.product-table col.c-cost{width:108px}
.product-table col.c-markup{width:82px}
.product-table col.c-sell{width:108px}
.product-table col.c-total{width:100px}
.product-table col.c-actions{width:112px}

/* Global Markup: number field and Apply to All match exactly. */
.global-markup-control{flex:0 0 auto;display:flex;align-items:center;gap:8px}
.global-markup-control label{margin:0;white-space:nowrap}
.global-markup-entry,.global-markup-control .small-action{width:96px;min-width:96px;max-width:96px;height:40px;min-height:40px;box-sizing:border-box;flex:0 0 96px}

/* Pricing cards. */
.pricing-panels-refined{display:grid;grid-template-columns:minmax(220px,.78fr) minmax(450px,1.48fr) minmax(330px,1fr);gap:16px;align-items:start}
.pricing-panels-refined>*{min-width:0}
.pricing-panels-refined .commission-card{grid-column:1;grid-row:1}
.pricing-panels-refined .quick-tools-card{grid-column:2;grid-row:1;min-width:0}
.pricing-panels-refined .pricing-summary-sidebar{grid-column:3;grid-row:1;position:sticky;top:82px;align-self:start;min-width:0;border-color:#d7e3f3;box-shadow:0 8px 24px rgba(20,46,86,.08)}

/* Quick Pricing Tools: Target and Alternative use identical controls. */
.pricing-comparison-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.pricing-scenario{min-width:0}
.scenario-head{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:start;padding-bottom:9px}
.scenario-head label{margin:0;min-width:0;line-height:1.2}
.scenario-markup-control{display:flex;align-items:center;justify-content:flex-start;gap:6px;min-width:0}
.scenario-markup-control select,.markup-manual-wrap .markup-entry{width:84px;min-width:84px;max-width:84px;height:36px;min-height:36px;box-sizing:border-box;margin:0}
.scenario-markup-control select{font-size:12px;text-align:left}
.markup-manual-wrap{display:flex;align-items:center;gap:6px;min-width:0}
.markup-manual-wrap>span{width:12px;min-width:12px;text-align:left;color:#617189;font-size:11px;font-weight:800}
.scenario-line{min-width:0}
.scenario-line span{min-width:0}
.scenario-line strong{white-space:nowrap}

/* Pricing Summary: Installation Charge and tax status are equal. */
.pricing-summary-sidebar .summary-list>div{min-width:0}
.pricing-summary-sidebar .summary-list>div>span:first-child{min-width:0}
.pricing-summary-sidebar .charge-tax-row{display:grid;grid-template-columns:1fr;align-items:stretch;gap:7px}
.pricing-summary-sidebar .charge-tax-controls{max-width:none;align-items:center}
.pricing-summary-sidebar .charge-tax-controls #installationCharge,.pricing-summary-sidebar .charge-tax-controls #installationTaxable{width:100%;min-width:0;max-width:none;height:36px;min-height:36px;box-sizing:border-box;margin:0}

/* Switch to the card layout earlier, before the table becomes awkwardly narrow. */
@media(max-width:1280px){
  .product-table td:nth-child(2):before{content:'Location / Room'}
  .product-table td:nth-child(3):before{content:'Product Type'}
  .product-table td:nth-child(4):before{content:'Vendor'}
  .product-table td:nth-child(5):before{content:'Operation'}
  .product-table td:nth-child(6):before{content:'IB / OB'}
  .product-table td:nth-child(7):before{content:'Width'}
  .product-table td:nth-child(8):before{content:'Height'}
  .product-table td:nth-child(9):before{content:'Control Location'}
  .product-table td:nth-child(10):before{content:'Detailed Product Description'}
  .product-table td:nth-child(11):before{content:'Qty'}
  .product-table td:nth-child(12):before{content:'Taxable'}
  .product-table td:nth-child(13):before{content:'Product Cost (ea)'}
  .product-table td:nth-child(14):before{content:'Markup %'}
  .product-table td:nth-child(15):before{content:'Selling Price (ea)'}
  .product-table td:nth-child(16):before{content:'Total'}
  .product-table td:nth-child(17):before{content:'Actions'}

  .product-table-wrap{overflow:visible}
  .product-table{min-width:0;width:100%;display:block}
  .product-table thead,.product-table colgroup{display:none}
  .product-table tbody{display:block;padding:10px}
  .product-table tr{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;border:1px solid #dce5ef;border-radius:10px;padding:10px;margin-bottom:10px}
  .product-table td{display:block;border:0;padding:0;min-width:0}
  .product-table td:nth-child(1){grid-column:1/-1;text-align:left}
  .product-table td:nth-child(10){grid-column:span 2}
  .product-table td:nth-child(17){grid-column:1/-1}
  .product-table input,.product-table select,.product-description-input{width:100%;min-width:0;max-width:none;font-size:12px}
  .product-table .money-cell{min-height:36px;display:flex;align-items:center;justify-content:flex-end}
  .product-table .row-actions{min-height:36px;justify-content:flex-end}
}

/* Stack pricing cards when the available workspace becomes tablet-sized. */
@media(max-width:1120px){
  .pricing-panels-refined{grid-template-columns:1fr}
  .pricing-panels-refined .commission-card,.pricing-panels-refined .quick-tools-card,.pricing-panels-refined .pricing-summary-sidebar{grid-column:auto;grid-row:auto;position:static;width:100%}
  .pricing-comparison-grid{grid-template-columns:1fr 1fr}
}

@media(max-width:700px){
  .product-table tr{grid-template-columns:repeat(2,minmax(0,1fr))}
  .product-table td:nth-child(10),.product-table td:nth-child(17){grid-column:1/-1}
  .pricing-comparison-grid{grid-template-columns:1fr}
  .global-markup-control{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .global-markup-control label{grid-column:1/-1}
  .global-markup-entry,.global-markup-control .small-action{width:100%;min-width:0;max-width:none}
}

/* =========================================================
   2026-09-24 RESPONSIVE UI FINALIZATION
   ========================================================= */

/* Keep field controls usable and aligned. */
.global-markup-entry,
.global-markup-control .small-action {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  height: 40px;
  min-height: 40px;
  flex: 0 0 96px;
}

.product-description-input {
  height: 36px;
  min-height: 36px;
  padding: 6px 7px;
  line-height: 22px;
  margin: 0;
  vertical-align: middle;
}

.scenario-markup-control select,
.markup-manual-wrap .markup-entry {
  width: 88px;
  min-width: 88px;
  max-width: 88px;
  height: 36px;
  min-height: 36px;
  margin: 0;
  box-sizing: border-box;
}

.scenario-markup-control select {
  padding: 5px 28px 5px 9px;
  line-height: 1.2;
}

.pricing-summary-sidebar .charge-tax-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.pricing-summary-sidebar .charge-tax-controls #installationCharge,
.pricing-summary-sidebar .charge-tax-controls #installationTaxable {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 36px;
  min-height: 36px;
  margin: 0;
}

/* Keep line-item actions visible and prevent control collapse. */




/* Move to card-style product rows early enough that nothing disappears off-screen. */
@media (max-width: 1500px) {
  .product-table-wrap {
    overflow: visible;
  }

  .product-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .product-table thead,
  .product-table colgroup {
    display: none;
  }

  .product-table tbody {
    display: block;
    padding: 10px;
  }

  .product-table tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px;
    border: 1px solid #dce5ef;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
  }

  .product-table td {
    display: block;
    min-width: 0;
    border: 0;
    padding: 0;
  }

  .product-table td::before {
    display: block;
    margin-bottom: 3px;
    color: #728098;
    font-size: 9px;
  }

  .product-table td:nth-child(2)::before{content:'Location / Room'}
  .product-table td:nth-child(3)::before{content:'Product Type'}
  .product-table td:nth-child(4)::before{content:'Vendor'}
  .product-table td:nth-child(5)::before{content:'Operation'}
  .product-table td:nth-child(6)::before{content:'IB / OB'}
  .product-table td:nth-child(7)::before{content:'Width'}
  .product-table td:nth-child(8)::before{content:'Height'}
  .product-table td:nth-child(9)::before{content:'Control Location'}
  .product-table td:nth-child(10)::before{content:'Detailed Product Description'}
  .product-table td:nth-child(11)::before{content:'Qty'}
  .product-table td:nth-child(12)::before{content:'Taxable'}
  .product-table td:nth-child(13)::before{content:'Product Cost (ea)'}
  .product-table td:nth-child(14)::before{content:'Markup %'}
  .product-table td:nth-child(15)::before{content:'Selling Price (ea)'}
  .product-table td:nth-child(16)::before{content:'Total'}
  .product-table td:nth-child(17)::before{content:'Actions'}

  .product-table td:nth-child(1) {
    grid-column: 1 / -1;
    text-align: left;
  }

  .product-table td:nth-child(10) {
    grid-column: span 2;
  }

  .product-table td:nth-child(17) {
    grid-column: 1 / -1;
  }

  .product-table input,
  .product-table select,
  .product-description-input {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 36px;
    min-height: 36px;
    font-size: 12px;
  }

  .product-table .money-cell {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .product-table .row-actions {
    min-width: 0;
    min-height: 36px;
    justify-content: flex-start;
  }
}

/* Stack pricing sections before they become cramped or clipped. */
@media (max-width: 1280px) {
  .pricing-panels-refined {
    grid-template-columns: 1fr;
  }

  .pricing-panels-refined .commission-card,
  .pricing-panels-refined .quick-tools-card,
  .pricing-panels-refined .pricing-summary-sidebar {
    grid-column: auto;
    grid-row: auto;
    position: static;
    width: 100%;
    min-width: 0;
  }

  .pricing-comparison-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Review/footer actions should wrap instead of clipping. */
.review-actions,
.product-page-actions {
  min-width: 0;
}

@media (max-width: 1180px) {
  .review-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-actions .action-spacer {
    display: none;
  }

  .review-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .product-table tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-table td:nth-child(10),
  .product-table td:nth-child(17) {
    grid-column: 1 / -1;
  }

  .pricing-comparison-grid {
    grid-template-columns: 1fr;
  }

  .global-markup-control {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .global-markup-control label {
    grid-column: 1 / -1;
  }

  .global-markup-entry,
  .global-markup-control .small-action {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  }

  .review-actions {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   PRODUCT LINE ITEMS — DEFAULT TWO-ROW LAYOUT
   2026-09-24
   ========================================================= */

/* The product editor now uses a two-row grid by default instead of
   trying to force all 17 fields across one horizontal table row. */
.product-card{
  overflow:hidden;
}

.product-table-wrap{
  width:100%;
  overflow:visible !important;
}

.product-table{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  table-layout:auto !important;
}

.product-table thead,
.product-table colgroup{
  display:none !important;
}

.product-table tbody{
  display:block !important;
  padding:10px;
}

.product-table tr{
  margin:0 0 10px;
  padding:10px;
  border:1px solid #dce5ef;
  border-radius:10px;
  background:#fff;
}

.product-table td{
  display:block !important;
  min-width:0 !important;
  width:auto !important;
  padding:0 !important;
  border:0 !important;
  vertical-align:bottom;
}

.product-table td::before{
  display:block;
  margin:0 0 4px;
  color:#728098;
  font-size:9px;
  font-weight:600;
  line-height:1.2;
}

.product-table td:nth-child(1)::before{content:''}
.product-table td:nth-child(2)::before{content:'Location / Room'}
.product-table td:nth-child(3)::before{content:'Product Type'}
.product-table td:nth-child(4)::before{content:'Vendor'}
.product-table td:nth-child(5)::before{content:'Operation'}
.product-table td:nth-child(6)::before{content:'IB / OB'}
.product-table td:nth-child(7)::before{content:'Width'}
.product-table td:nth-child(8)::before{content:'Height'}
.product-table td:nth-child(9)::before{content:'Control Location'}
.product-table td:nth-child(10)::before{content:'Detailed Product Description'}
.product-table td:nth-child(11)::before{content:'Qty'}
.product-table td:nth-child(12)::before{content:'Taxable'}
.product-table td:nth-child(13)::before{content:'Product Cost (ea)'}
.product-table td:nth-child(14)::before{content:'Markup %'}
.product-table td:nth-child(15)::before{content:'Selling Price (ea)'}
.product-table td:nth-child(16)::before{content:'Total'}


/* Row 1 = # through Control Location. Row 2 starts with a wider description. */
.product-table td:nth-child(10){
  grid-column:span 2;
}

.product-table input,
.product-table select,
.product-description-input{
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  height:36px;
  min-height:36px;
  margin:0;
  box-sizing:border-box;
  font-size:12px;
}

.product-table .row-number{
  padding-top:14px !important;
}

.product-table .money-cell{
  display:flex !important;
  align-items:center;
  justify-content:flex-end;
  min-height:36px;
  white-space:nowrap;
}

.product-table .row-actions{
  display:flex !important;
  flex-wrap:nowrap;
  min-width:0 !important;
}

.product-table .row-actions > *{
  flex:0 0 32px;
}

/* Tablet: keep the same fields but use four columns so nothing becomes cramped. */
@media(max-width:1050px){
  

  .product-table td:nth-child(1){
    justify-content:flex-start;
    padding-top:0 !important;
  }

  .product-table td:nth-child(10){
    grid-column:span 2;
  }

  .product-table td:nth-child(17){
    grid-column:1/-1;
  }
}

/* Phone / very small tablet. */
@media(max-width:650px){
  

  .product-table td:nth-child(10),
  .product-table td:nth-child(17){
    grid-column:1/-1;
  }
}

/* =========================================================
   PRODUCT LINE FINAL VISUAL POLISH - 2026-09-24
   ========================================================= */

/* Larger, darker line number with a soft highlight. */
.product-table .row-number{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  align-self:stretch;
  min-height:72px !important;
  padding:0 !important;
  border-radius:10px !important;
  background:#eef5ff !important;
  color:#0b2f67 !important;
  font-size:20px !important;
  font-weight:800 !important;
  line-height:1 !important;
}
.product-table .row-number::before{content:none !important;display:none !important;}

/* Make the Total a deliberate summary block instead of plain inline text. */
.product-table td.money-cell{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:72px !important;
  padding:9px 12px !important;
  border-radius:10px !important;
  background:#eef5ff !important;
  color:#0b2f67 !important;
  font-size:17px !important;
  font-weight:800 !important;
  line-height:1.15 !important;
  text-align:center !important;
}
.product-table td.money-cell::before{
  content:'Total' !important;
  display:block !important;
  margin:0 0 7px !important;
  color:#102e55 !important;
  font-size:13px !important;
  font-weight:800 !important;
  line-height:1 !important;
  text-align:center !important;
}

/* No redundant Actions label; the icons are self-explanatory. */
.product-table td:nth-child(17)::before{content:none !important;display:none !important;}
.product-table .row-actions{
  min-height:72px !important;
  align-items:center !important;
  justify-content:center !important;
  gap:9px !important;
}
.product-table .line-attachment,
.product-table .duplicate-line,
.product-table .delete-line{
  width:38px !important;
  height:38px !important;
  flex:0 0 38px !important;
  display:inline-grid !important;
  place-items:center !important;
  border:1px solid #d2deec !important;
  border-radius:8px !important;
  background:#fff !important;
  font-size:21px !important;
  font-weight:800 !important;
  line-height:1 !important;
  box-shadow:0 1px 3px rgba(15,45,80,.05);
}
.product-table .line-attachment,
.product-table .duplicate-line{color:#0b55b6 !important;}
.product-table .delete-line{color:#d92d20 !important;border-color:#efc7c3 !important;background:#fffafa !important;}
.product-table .line-attachment:hover,
.product-table .duplicate-line:hover{background:#edf5ff !important;border-color:#9ebde2 !important;}
.product-table .delete-line:hover{background:#fff1f1 !important;border-color:#e69e98 !important;color:#b42318 !important;}

/* Product Cost information popup. */



.cost-info-dialog{width:min(520px,calc(100vw - 32px));}










@media(max-width:650px){
  .product-table .row-number{min-height:52px !important;font-size:18px !important;}
  .product-table td.money-cell,.product-table .row-actions{min-height:58px !important;}
  
}


/* =========================================================
   PRODUCT LINE FINAL CLEANUP - 2026-09-24
   ========================================================= */

/* Keep line number permanently anchored on the left and exactly input-height. */

.product-table td:nth-child(1),
.product-table .row-number{
  grid-column:1 !important;
  grid-row:1 !important;
  align-self:end !important;
  justify-self:stretch !important;
  width:100% !important;
  height:36px !important;
  min-height:36px !important;
  max-height:36px !important;
  padding:0 !important;
  margin:0 !important;
  border-radius:6px !important;
  background:#eef5ff !important;
  color:#0b2f67 !important;
  font-size:18px !important;
  font-weight:800 !important;
  line-height:36px !important;
  text-align:center !important;
  display:block !important;
}
.product-table .row-number::before,
.product-table td:nth-child(1)::before{
  display:none !important;
  content:none !important;
}

/* Preserve the left number column as other fields wrap. */
@media(max-width:1050px){
  .product-table tr{
    grid-template-columns:42px repeat(3,minmax(0,1fr)) !important;
  }
  .product-table td:nth-child(1){
    grid-column:1 !important;
    grid-row:1 !important;
  }
}
@media(max-width:650px){
  .product-table tr{
    grid-template-columns:42px minmax(0,1fr) !important;
  }
  .product-table td:nth-child(1){
    grid-column:1 !important;
    grid-row:1 !important;
  }
}

/* Product Cost information modal - application styled, no native popover. */
.cost-info-modal[hidden]{display:none !important;}
.cost-info-modal{
  position:fixed;
  inset:0;
  z-index:1700;
  display:grid;
  place-items:center;
  padding:20px;
}
.cost-info-backdrop{
  position:absolute;
  inset:0;
  background:rgba(7,24,44,.55);
  backdrop-filter:blur(2px);
}
.cost-info-dialog{
  position:relative;
  z-index:1;
  width:min(520px,calc(100vw - 32px));
  max-height:calc(100vh - 40px);
  overflow:auto;
  background:#fff;
  border:1px solid #dce5ef;
  border-radius:14px;
  box-shadow:0 24px 70px rgba(4,22,48,.30);
  padding:22px;
}
.cost-info-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding-bottom:13px;
  border-bottom:1px solid #e6ecf3;
}
.cost-info-head h3{margin:0;color:#17365d;font-size:20px;}
.cost-info-head p{margin:4px 0 0;color:#697b91;font-size:11px;line-height:1.45;}
.cost-info-close{
  border:0;
  background:transparent;
  color:#60738d;
  font-size:28px;
  line-height:1;
  cursor:pointer;
  padding:0 3px;
}
.cost-info-body{display:grid;gap:10px;margin-top:15px;}
.cost-info-item{
  border:1px solid #e0e8f2;
  background:#f8fbff;
  border-radius:9px;
  padding:11px 12px;
}
.cost-info-item strong{display:block;color:#17365d;font-size:12px;margin-bottom:4px;}
.cost-info-item span{display:block;color:#5f7188;font-size:11px;line-height:1.5;}
.cost-info-actions{display:flex;justify-content:flex-end;margin-top:16px;}
.cost-info-actions .btn{height:40px;min-width:92px;}
@media(max-width:650px){.cost-info-dialog{padding:17px;}}
.attachment-folder-chooser[hidden]{display:none}
.attachment-folder-chooser{display:grid;gap:10px;padding:14px;margin-bottom:10px;border:1px solid #cbd9ea;border-radius:8px;background:#f8fbff;font-size:12px;font-weight:700;color:#183252}
.attachment-folder-chooser select{width:100%;min-height:38px;padding:8px;border:1px solid #b8cce5;border-radius:6px;background:#fff;font:inherit}
.attachment-folder-buttons{display:flex;justify-content:flex-end;gap:8px}
.attachment-drop-zone{border:2px dashed #b8cce5;border-radius:8px;min-height:82px;padding:20px 18px;margin:0 0 12px;text-align:center;color:#586a83;font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.attachment-drop-zone.drag-over,.attachment-drop-zone:focus{background:#edf5ff;border-color:#1764df;outline:none}
.attachment-folder-filter[hidden]{display:none}
.attachment-folder-filter{display:flex;align-items:center;gap:8px;padding:8px 0 12px;font-size:12px;color:#183252}
.attachment-folder-filter select{min-width:0;flex:1;min-height:36px;padding:6px;border:1px solid #b8cce5;border-radius:6px;background:#fff}
.attachment-folder-back{border:0;background:transparent;color:#1764df;font-weight:700;cursor:pointer;padding:6px}
.attachment-folder-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px 2px}
.attachment-folder-card{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-height:92px;padding:13px;text-align:left;border:1px solid #d6e0ec;border-radius:8px;background:#f8fbff;color:#34516e;font-weight:700;cursor:pointer}
.attachment-folder-card:hover,.attachment-folder-card:focus{border-color:#1764df;background:#edf5ff}
.attachment-folder-card small{color:#718097;font-weight:400}
.attachment-folder-count{display:inline-flex;align-items:center;min-height:24px;padding:3px 9px;border-radius:999px;background:#e8eff5;color:#5d7186!important;font-weight:700!important}
.attachment-folder-card.has-files{border-color:#aad7cc;background:#f4fbf9}
.attachment-folder-card.has-files .attachment-folder-count{background:#13795b;color:#fff!important}
.attachment-folder-icon{font-size:20px}
.side-nav a[data-reports-nav][hidden]{display:none!important}
.attachment-preview[hidden],.attachment-preview-actions a[hidden]{display:none}
.attachment-preview{position:fixed;inset:0;z-index:1100;display:grid;place-items:center;padding:14px}
.attachment-preview-backdrop{position:absolute;inset:0;background:#091a30b8}
.attachment-preview-panel{position:relative;display:flex;flex-direction:column;width:min(920px,100%);height:min(850px,94dvh);min-height:320px;background:#fff;border-radius:12px;box-shadow:0 18px 55px #091a3060;overflow:hidden}
.attachment-preview-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;border-bottom:1px solid #d9e3ef}
.attachment-preview-head strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}
.attachment-preview-head button{flex:none;border:0;background:transparent;color:#53657e;font-size:30px;cursor:pointer}
.attachment-preview-body{display:grid;place-items:center;flex:1;min-height:0;background:#f3f6fa;overflow:auto}
.attachment-preview-body iframe{display:block;width:100%;height:100%;border:0;background:#fff}
.attachment-preview-body img{display:block;max-width:100%;max-height:100%;object-fit:contain}
.attachment-preview-body p{padding:20px;text-align:center;color:#53657e}
.attachment-preview-actions{display:flex;justify-content:flex-end;gap:10px;padding:12px 18px;border-top:1px solid #d9e3ef}
.attachment-preview-actions .btn{display:inline-flex;align-items:center;justify-content:center;min-width:0;height:40px;text-decoration:none;font-size:12px}
@media(max-width:560px){.attachment-preview{padding:0}.attachment-preview-panel{width:100%;height:100dvh;border-radius:0}.attachment-preview-actions{flex-wrap:wrap}.attachment-preview-actions .btn{width:auto;flex:1}}
@media(max-width:420px){.attachment-folder-grid{grid-template-columns:1fr}}

/* Dimensions must be exact eighths before they can be saved. */
.commission-review-row[hidden],
#commissionCard[hidden],
.commission-preview[hidden],
.commission-line[hidden],
#underTargetWarning[hidden],
#potentialEarnings[hidden]{display:none!important}
.product-table input[aria-invalid="true"]{
  border-color:#c33b48!important;
  background:#fff7f7!important;
  box-shadow:0 0 0 2px #c33b4826;
}

/* Keep the installation tax control inside its pricing card on narrow iPads. */
@media(max-width:1200px){
  .pricing-summary-sidebar .charge-tax-row{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:7px;
    min-width:0;
  }
  .pricing-summary-sidebar .charge-tax-controls{
    width:100%;
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
  }
  .pricing-summary-sidebar .charge-tax-controls > *{
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
  }
}

/* Commercial estimators share the saved revision model and get a distinct workspace. */
.commercial-mode .page-heading h2{color:#123f73}
.commercial-mode .project-strip-card{border-top:4px solid #326ba5}
.commercial-mode .product-card-head{border-left:4px solid #326ba5;padding-left:12px}



/* ========================================================================
   PRODUCT LINE ITEMS — AUTHORITATIVE RESPONSIVE LAYOUT
   2026-09-27
   This is the final cascade authority for product line-item cards.
   It prevents the 42px line-number track from being reused by later rows
   and gives the IB/OB+Width and Markup+Selling Price pairs usable space.
   ======================================================================== */

.product-table tr {
  display: grid !important;
  grid-template-columns: 42px repeat(4, minmax(0, 1fr)) !important;
  gap: 12px 14px !important;
  align-items: end !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* Explicit placement: the 42px track belongs ONLY to the line number. */
.product-table tr > td:nth-child(1)  { grid-column: 1; grid-row: 1; }
.product-table tr > td:nth-child(2)  { grid-column: 2; grid-row: 1; }
.product-table tr > td:nth-child(3)  { grid-column: 3; grid-row: 1; }
.product-table tr > td:nth-child(4)  { grid-column: 4; grid-row: 1; }
.product-table tr > td:nth-child(5)  { grid-column: 5; grid-row: 1; }

.product-table tr > td:nth-child(6)  { grid-column: 2; grid-row: 2; }
.product-table tr > td:nth-child(7)  { grid-column: 3; grid-row: 2; }
.product-table tr > td:nth-child(8)  { grid-column: 4; grid-row: 2; }
.product-table tr > td:nth-child(9)  { grid-column: 5; grid-row: 2; }





.product-table tr > td:nth-child(13) { grid-column: 2; grid-row: 4; }
.product-table tr > td:nth-child(14) { grid-column: 3; grid-row: 4; }
.product-table tr > td:nth-child(15) { grid-column: 4; grid-row: 4; }
.product-table tr > td:nth-child(16) { grid-column: 5; grid-row: 4; }

.product-table tr > td:nth-child(17) {
  grid-column: 2 / -1;
  grid-row: 5;
}

/* Every field stays inside its assigned grid cell. */
.product-table tr > td {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.product-table tr > td input,
.product-table tr > td select,
.product-table tr > td textarea {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* At narrower tablet widths, retain four usable control columns.
   The explicit placement above prevents any field from entering column 1. */
@media (max-width: 1050px) {
  .product-table tr {
    grid-template-columns: 42px repeat(4, minmax(105px, 1fr)) !important;
    overflow-x: auto;
  }
}

/* Phone: remove the dedicated side track from the field layout.
   The number occupies its own row; controls use two full-width columns. */
@media (max-width: 650px) {
  .product-table tr {
    grid-template-columns: repeat(2, minmax(105px, 1fr)) !important;
    gap: 12px !important;
  }

  .product-table tr > td:nth-child(1) {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    width: 42px !important;
    justify-self: start !important;
  }

  .product-table tr > td:nth-child(n+2) {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .product-table tr > td:nth-child(11),
  .product-table tr > td:nth-child(17) {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 430px) {
  .product-table tr {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .product-table tr > td {
    grid-column: 1 !important;
  }
}

/* ========================================================================
   PRODUCT LINE ITEMS — FINAL SIZING / SPACING POLISH
   2026-09-27
   Keeps the proven field order, row placement, and responsive breakpoints.
   Only desktop/tablet sizing, track proportions, and visual spacing change.
   ======================================================================== */

/* Desktop / large tablet: four purposeful content tracks instead of four
   equally stretched columns. This keeps the form visually connected while
   still allowing the useful text fields to absorb available room. */
@media (min-width: 1051px) {
  .product-table tr {
    grid-template-columns:
      42px
      minmax(190px, 1.18fr)
      minmax(165px, 1fr)
      minmax(165px, 1fr)
      minmax(150px, .92fr) !important;
    column-gap: 16px !important;
    row-gap: 12px !important;
  }
}

/* Description owns the extra room on row 3; Qty and Taxable stay compact. */
.product-table tr > td:nth-child(10) {
  grid-column: 2 / span 2 !important;
  grid-row: 3 !important;
  justify-self: stretch !important;
}
.product-table tr > td:nth-child(11) { grid-column: 4 !important; grid-row: 3 !important; }
.product-table tr > td:nth-child(12) { grid-column: 5 !important; grid-row: 3 !important; }

/* Medium fields should visually fill their track rather than float as tiny
   islands. Their grid tracks, not arbitrary hard caps, control the width. */
.product-table tr > td:nth-child(2) input,
.product-table tr > td:nth-child(2) select,
.product-table tr > td:nth-child(3) input,
.product-table tr > td:nth-child(3) select,
.product-table tr > td:nth-child(4) input,
.product-table tr > td:nth-child(4) select,
.product-table tr > td:nth-child(5) input,
.product-table tr > td:nth-child(5) select,
.product-table tr > td:nth-child(9) input,
.product-table tr > td:nth-child(9) select,
.product-table tr > td:nth-child(10) input,
.product-table tr > td:nth-child(10) textarea {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

/* Compact controls: deliberately limited so they remain proportional. */
.product-table tr > td:nth-child(6) input,
.product-table tr > td:nth-child(6) select {
  width: clamp(96px, 72%, 118px) !important;
  min-width: 96px !important;
  max-width: 118px !important;
}

.product-table tr > td:nth-child(7) input,
.product-table tr > td:nth-child(7) select,
.product-table tr > td:nth-child(8) input,
.product-table tr > td:nth-child(8) select {
  width: clamp(110px, 78%, 138px) !important;
  min-width: 110px !important;
  max-width: 138px !important;
}





.product-table tr > td:nth-child(13) input,
.product-table tr > td:nth-child(13) select {
  width: clamp(135px, 82%, 165px) !important;
  min-width: 135px !important;
  max-width: 165px !important;
}

.product-table tr > td:nth-child(14) input,
.product-table tr > td:nth-child(14) select {
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
}

.product-table tr > td:nth-child(15) input,
.product-table tr > td:nth-child(15) select {
  width: clamp(140px, 84%, 170px) !important;
  min-width: 140px !important;
  max-width: 170px !important;
}

.product-table tr > td:nth-child(16) {
  width: clamp(150px, 88%, 180px) !important;
  max-width: 180px !important;
  justify-self: start !important;
}

/* Capped controls stay left-aligned inside their tracks. */
.product-table tr > td:nth-child(6),
.product-table tr > td:nth-child(7),
.product-table tr > td:nth-child(8),
.product-table tr > td:nth-child(11),
.product-table tr > td:nth-child(12),
.product-table tr > td:nth-child(13),
.product-table tr > td:nth-child(14),
.product-table tr > td:nth-child(15),
.product-table tr > td:nth-child(16) {
  justify-self: start;
}

/* Preserve the already-working narrow-screen behavior. */
@media (max-width: 1050px) {
  .product-table tr > td:nth-child(10),
  .product-table tr > td:nth-child(11),
  .product-table tr > td:nth-child(12) {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .product-table tr > td:nth-child(10) {
    grid-column: span 2 !important;
  }

  .product-table tr > td:nth-child(n+2):nth-child(-n+16) {
    justify-self: stretch;
  }

  .product-table tr > td:nth-child(n+2):nth-child(-n+15) input,
  .product-table tr > td:nth-child(n+2):nth-child(-n+15) select,
  .product-table tr > td:nth-child(10) textarea {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .product-table tr > td:nth-child(16) {
    width: 100% !important;
    max-width: 100% !important;
    justify-self: stretch !important;
  }
}

@media (max-width: 650px) {
  .product-table tr > td:nth-child(10) {
    grid-column: auto !important;
  }
  .product-table tr > td:nth-child(11) {
    grid-column: 1 / -1 !important;
  }
}

/* ========================================================================
   PRODUCT LINE ITEMS — FINAL NIGHT ALIGNMENT / COMPACT CONTROLS
   2026-09-27
   Sizing/alignment only. No breakpoint or wrapping logic changes.
   ======================================================================== */

/* Qty: approximately 40–50% narrower than the prior 92px control. */
.product-table tr > td:nth-child(11) input,
.product-table tr > td:nth-child(11) select {
  width: 60px !important;
  min-width: 60px !important;
  max-width: 60px !important;
}

/* Taxable: slightly narrower while still comfortably fitting Yes / No. */
.product-table tr > td:nth-child(12) input,
.product-table tr > td:nth-child(12) select {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
}

/* At the existing tablet breakpoint, keep Description aligned with the
   normal field start (column 2) instead of allowing auto-placement into
   the line-number gutter. Qty and Taxable remain compact beside it. */
@media (max-width: 1050px) and (min-width: 651px) {
  .product-table tr > td:nth-child(10) {
    grid-column: 2 !important;
    grid-row: 3 !important;
    justify-self: stretch !important;
  }

  .product-table tr > td:nth-child(11) {
    grid-column: 3 !important;
    grid-row: 3 !important;
    justify-self: start !important;
  }

  .product-table tr > td:nth-child(12) {
    grid-column: 4 !important;
    grid-row: 3 !important;
    justify-self: start !important;
  }

  .product-table tr > td:nth-child(11) input,
  .product-table tr > td:nth-child(11) select {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
  }

  .product-table tr > td:nth-child(12) input,
  .product-table tr > td:nth-child(12) select {
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
  }
}

/* Preserve the existing phone behavior. */
@media (max-width: 650px) {
  .product-table tr > td:nth-child(11) input,
  .product-table tr > td:nth-child(11) select,
  .product-table tr > td:nth-child(12) input,
  .product-table tr > td:nth-child(12) select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* =========================================================
   FINALIZED ESTIMATE PAYMENTS — 2026-09-29
   ========================================================= */
.payment-card{margin-top:16px;padding:16px 18px}.payment-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px}.payment-summary-grid>div{border:1px solid #e1e8f1;background:#fbfdff;border-radius:8px;padding:11px 12px}.payment-summary-grid span,.payment-entry label span{display:block;color:#6c7b90;font-size:9px;text-transform:uppercase;letter-spacing:.04em;margin-bottom:4px}.payment-summary-grid strong{font-size:15px;color:#1c2f4f}.payment-entry{margin-top:14px;padding:14px;border:1px solid #dce5ef;border-radius:9px;background:#f8fbff}.payment-entry-grid{display:grid;grid-template-columns:1fr 1fr 1.25fr 1.25fr 2fr;gap:10px}.payment-entry label{min-width:0}.payment-entry input,.payment-entry select{width:100%;height:36px;box-sizing:border-box;border:1px solid #cfd9e6;border-radius:6px;background:#fff;padding:6px 8px;font:inherit}.payment-entry-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}.payment-history-wrap{margin-top:14px;overflow:auto}.payment-history-table{width:100%;border-collapse:collapse}.payment-history-table th{background:#f2f6fb;color:#233450;font-size:10px;text-align:left;padding:9px 8px;border-bottom:1px solid #dce5ef}.payment-history-table td{font-size:11px;padding:9px 8px;border-bottom:1px solid #edf1f6;vertical-align:top}.payment-history-table th:nth-child(5),.payment-history-table td:nth-child(5){text-align:right;white-space:nowrap}.payment-history-table th:last-child,.payment-history-table td:last-child{text-align:right;width:54px}.payment-empty{text-align:center!important;color:#728098;padding:18px!important}.payment-history-table tr.is-voided td{color:#8995a6;text-decoration:none}.payment-history-table tr.is-voided td:nth-child(5){text-decoration:line-through}.payment-voided{display:block;margin-top:3px;color:#a92d2d;font-size:9px;font-weight:700}.payment-void{color:#a92d2d}.payment-card[hidden]{display:none!important}@media(max-width:1000px){.payment-summary-grid{grid-template-columns:repeat(2,1fr)}.payment-entry-grid{grid-template-columns:repeat(2,1fr)}.payment-notes{grid-column:1/-1}}@media(max-width:650px){.payment-summary-grid,.payment-entry-grid{grid-template-columns:1fr}.payment-notes{grid-column:auto}}

/* 2026-09-29 payment entry reliability patch */
.payment-entry[hidden]{display:none!important}
.payment-entry input:not(:disabled),.payment-entry select:not(:disabled){pointer-events:auto!important;opacity:1!important;cursor:text}
.payment-entry select:not(:disabled){cursor:pointer}


/* 2026-09-29: Estimates / Drafts salesperson filter */
.estimate-search-row .sales-rep-filter{
  flex:0 0 230px;
  min-width:200px;
  height:42px;
  padding:0 34px 0 12px;
  border:1px solid #cfd9e6;
  border-radius:8px;
  background:#fff;
  color:#243447;
  font:inherit;
}
@media(max-width:900px){
  .estimate-search-row .sales-rep-filter{width:100%;min-width:0;flex:1 1 auto;}
}

/* Commercial estimating temporarily bypasses Installation Details. */
.commercial-review-flow .review-grid-two{grid-template-columns:1fr}

/* 2026-10-02 commercial workflow cleanup */
.progress-step.disabled-step{
  pointer-events:none;
  cursor:default;
}
.progress-step.disabled-step .step-number{
  background:#e3e8ef;
  color:#9aa8ba;
  box-shadow:none;
}
.progress-step.disabled-step strong{
  color:#7c899b;
}
.progress-step.disabled-step small{
  color:#9aa5b5;
}
.commercial-review-flow .review-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.commercial-review-flow .review-actions .action-spacer{
  flex:1 1 auto;
}
.commercial-review-flow .review-actions .btn{
  min-width:150px;
}
.commercial-review-flow #finalizeBtn{
  min-width:230px;
}
@media(max-width:900px){
  .commercial-review-flow .review-actions .action-spacer{display:none}
  .commercial-review-flow .review-actions .btn{flex:1 1 220px}
}


/* Home welcome actions */
.home-hero-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.home-dashboard-btn{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
@media(max-width:640px){.home-hero-actions{align-items:stretch;flex-direction:column}.home-hero-actions .btn{width:100%;justify-content:center}}


/* Personalized homepage messages */






.admin-home-message{margin:22px 0;padding:18px;border:1px solid #dfe5ec;border-radius:10px;background:#fafbfd}
.admin-home-message textarea{width:100%;resize:vertical;min-height:92px}
.admin-home-message-grid{display:grid;gap:12px;margin-top:12px}
.admin-home-message-grid label,.admin-home-message>label{display:block;margin-bottom:6px;font-weight:700}
.admin-message-active{margin:14px 0}
.admin-home-message-actions{display:flex;gap:10px;flex-wrap:wrap}
@media(max-width:760px){}


/* Hero personalized message override */
.home-hero-copy #homeHeroMessage.home-hero-personal-message{font-size:1.5rem;line-height:1.35;font-weight:700;max-width:760px}
.home-hero-copy #homeHeroMessage.home-hero-personal-message.celebration{color:#8a6200}
.home-hero-copy #homeHeroMessage.home-hero-personal-message.important{color:#a72d2d}


/* Homepage message animation library */
.admin-home-message-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.admin-message-preview-wrap{margin:16px 0;padding:14px;border:1px solid #dce4ee;border-radius:10px;background:#fff}
.admin-message-preview-label{font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#6a788a;margin-bottom:10px}
.admin-message-preview-stage{min-height:66px;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:10px 18px;margin-bottom:10px;border-radius:8px;background:#f7f9fc}
#adminHomeMessagePreview{display:inline-block;font-size:1.5rem;line-height:1.35;font-weight:700;text-align:center;color:#253548}
.home-message-animated{display:inline-block;transform-origin:center}
.home-message-style-celebration{color:#8a6200!important}
.home-message-style-important{color:#a72d2d!important}

@keyframes hmElegantFade{from{opacity:0}to{opacity:1}}
@keyframes hmGentlePulse{0%,100%{transform:scale(1)}40%{transform:scale(1.045)}70%{transform:scale(1)}}
@keyframes hmCelebrationBounce{0%{opacity:0;transform:scale(.92) translateY(8px)}45%{opacity:1;transform:scale(1.06) translateY(-5px)}70%{transform:scale(.985) translateY(1px)}100%{transform:scale(1) translateY(0)}}
@keyframes hmAnniversaryGlow{0%,100%{text-shadow:0 0 0 rgba(196,150,38,0)}45%{text-shadow:0 0 8px rgba(196,150,38,.45),0 0 18px rgba(196,150,38,.24)}}
@keyframes hmSpotlight{0%{opacity:.35;filter:brightness(.75)}100%{opacity:1;filter:brightness(1)}}
@keyframes hmSmoothRise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes hmReveal{from{clip-path:inset(0 100% 0 0);opacity:.4}to{clip-path:inset(0 0 0 0);opacity:1}}
@keyframes hmEmphasisPop{0%{opacity:.6;transform:scale(.95)}55%{opacity:1;transform:scale(1.05)}100%{transform:scale(1)}}
@keyframes hmShimmer{0%{background-position:150% 50%}100%{background-position:-50% 50%}}

.home-message-animation-elegant_fade{animation:hmElegantFade 1s ease-out both}
.home-message-animation-gentle_pulse{animation:hmGentlePulse 1.8s ease-in-out 3}
.home-message-animation-celebration_bounce{animation:hmCelebrationBounce 1s cubic-bezier(.22,.9,.3,1.2) both}
.home-message-animation-anniversary_glow{animation:hmAnniversaryGlow 2.2s ease-in-out 3}
.home-message-animation-spotlight{animation:hmSpotlight 1.35s ease-out both}
.home-message-animation-smooth_rise{animation:hmSmoothRise .9s cubic-bezier(.2,.7,.2,1) both}
.home-message-animation-reveal{animation:hmReveal 1.15s ease-out both}
.home-message-animation-emphasis_pop{animation:hmEmphasisPop .8s cubic-bezier(.2,.8,.25,1.15) both}
.home-message-animation-shimmer{background-image:linear-gradient(105deg,currentColor 30%,#d8aa38 47%,#fff1a8 50%,#d8aa38 53%,currentColor 70%);background-size:250% 100%;background-clip:text;-webkit-background-clip:text;color:transparent!important;-webkit-text-fill-color:transparent;animation:hmShimmer 1.8s ease-in-out 1 both}

@media(prefers-reduced-motion:reduce){
  .home-message-animated{animation:none!important;transition:none!important}
}
@media(max-width:760px){.admin-home-message-grid{grid-template-columns:1fr}}


/* Shared top-right user account menu */
.home-topbar-right{position:relative}
.user-menu-trigger{display:inline-flex;align-items:center;gap:9px;border:0;background:transparent;color:inherit;font:inherit;padding:2px 6px 2px 2px;border-radius:999px;cursor:pointer}
.user-menu-trigger:hover,.user-menu-trigger:focus-visible{background:#eef5fc;outline:none}
.user-menu-trigger strong{font-weight:800}
.user-menu-popover{position:absolute;right:0;top:calc(100% + 10px);z-index:1200;width:260px;background:#fff;border:1px solid #d9e2ec;border-radius:12px;box-shadow:0 16px 40px rgba(15,63,119,.18);padding:8px}
.user-menu-account{padding:10px 12px;display:flex;flex-direction:column;gap:3px}
.user-menu-account strong{font-size:14px;color:#17365d}
.user-menu-account span,.user-menu-account small{font-size:12px;color:#667085;overflow-wrap:anywhere}
.user-menu-separator{height:1px;background:#e8edf3;margin:5px 4px}
.user-menu-popover>a,.user-menu-popover>button{width:100%;display:flex;align-items:center;text-align:left;border:0;background:transparent;color:#17365d;text-decoration:none;font:inherit;font-weight:700;padding:10px 12px;border-radius:8px;cursor:pointer}
.user-menu-popover>a:hover,.user-menu-popover>button:hover{background:#f3f7fb}
.user-menu-popover .user-menu-logout{color:#b42318}
.user-password-overlay{position:fixed;inset:0;z-index:2000;background:rgba(15,23,42,.48);display:grid;place-items:center;padding:20px}
.user-password-dialog{width:min(480px,100%);background:#fff;border-radius:14px;box-shadow:0 24px 70px rgba(0,0,0,.24);padding:22px}
.user-password-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:14px}
.user-password-head h2{margin:0 0 4px;color:#17365d}
.user-password-head p{margin:0;color:#667085}
.user-password-close{border:0;background:transparent;font-size:28px;line-height:1;cursor:pointer;color:#667085}
.user-password-dialog label{display:flex;flex-direction:column;gap:6px;margin-top:12px;font-weight:700;color:#344054}
.user-password-dialog input{width:100%;box-sizing:border-box}
.user-password-hint{display:block;margin-top:8px;color:#667085}
.user-password-message{margin-top:12px;padding:10px 12px;border-radius:8px;background:#fff1f0;color:#b42318;font-weight:700}
.user-password-message.success{background:#ecfdf3;color:#027a48}
.user-password-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
@media(max-width:700px){.user-menu-popover{right:-4px;width:min(280px,calc(100vw - 24px))}.user-menu-trigger strong{display:none}}



/* Service module coming-soon preview */

.service-coming-modal[hidden]{display:none!important}
.service-coming-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;padding:22px}
.service-coming-backdrop{position:absolute;inset:0;background:rgba(11,35,66,.55);backdrop-filter:blur(2px)}
.service-coming-dialog{position:relative;z-index:1;width:min(560px,calc(100vw - 32px));background:#fff;border-radius:18px;padding:34px 34px 30px;box-shadow:0 24px 70px rgba(16,33,62,.3);text-align:center;border:1px solid #d9e3ef}
.service-coming-icon{width:58px;height:58px;margin:0 auto 16px;border-radius:16px;background:#eef5ff;display:grid;place-items:center;font-size:28px}
.service-coming-dialog h2{margin:0 0 14px;color:#0b2342;font-size:24px;line-height:1.25;font-weight:800}
.service-coming-dialog p{margin:0 auto 12px;max-width:470px;color:#42526a;font-size:16px;line-height:1.55}
.service-coming-dialog strong{display:block;color:#0b2342;font-size:18px;margin-top:8px}
.service-coming-close{position:absolute;top:12px;right:14px;border:0;background:transparent;color:#66758c;font-size:28px;line-height:1;cursor:pointer;padding:4px 7px}
.service-coming-ok{margin-top:22px;min-width:120px}
body.service-modal-open{overflow:hidden}
@media(max-width:640px){
  .service-coming-dialog{padding:30px 22px 24px}
  .service-coming-dialog h2{font-size:21px}
  .service-coming-dialog p{font-size:15px}
}

/* Customer Directory: keep the customer details readable when several action buttons show. */
.customer-directory-card{grid-template-columns:minmax(280px,1fr) auto}
.customer-directory-card>div:last-child{max-width:560px}
@media (max-width:640px){
 .customer-directory-card{grid-template-columns:1fr}
 .customer-directory-card>div:last-child{max-width:none;justify-content:flex-start;text-align:left}
}


/* 2026-10-15 density pass: the progress tracker has 4 steps and 3 connecting lines (7 items),
   but its grid only had 5 columns, so step 4 always wrapped onto a second line. Desktop only;
   phones keep their own scrolling tracker (max-width:900px rules above). */
@media(min-width:901px){
  .progress{grid-template-columns:auto minmax(16px,1fr) auto minmax(16px,1fr) auto minmax(16px,1fr) auto;max-width:1100px}
  .progress-line{margin:0 8px}
  .step-number{font-size:14px}
}
@media(min-width:901px) and (max-width:1250px){.progress-step small{display:none}}
@media(min-width:901px) and (max-width:1100px){.progress-step strong{font-size:13px}.progress-step{gap:8px}}
@media(min-width:901px) and (max-width:1000px){.progress-step strong{font-size:12px}.progress-line{margin:0 4px}.step-number{width:28px;height:28px}}

/* Add user / installer login dialogs (2026-10-18) */
.ca-dialog{border:0;border-radius:14px;padding:0;width:min(520px,calc(100vw - 32px));box-shadow:0 24px 60px #0b1e3a55;color:#17243a}
.ca-dialog::backdrop{background:#0b1e3a66}
.ca-dialog form{padding:18px 20px 16px;display:grid;gap:2px}
.ca-dialog h3{margin:0 0 4px;font-size:19px}
.ca-dialog .ca-sub{margin:0 0 6px;color:var(--muted);font-size:13px}
.ca-dialog .ca-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ca-dialog fieldset{border:1px solid #dbe4ef;border-radius:10px;padding:8px 12px 10px;margin:10px 0 2px}
.ca-dialog legend{font-size:12px;font-weight:700;padding:0 4px}
.ca-dialog .ca-radio{display:flex;gap:8px;align-items:flex-start;font-weight:400;font-size:14px;margin:6px 0}
.ca-dialog .ca-radio input,.ca-dialog .ca-check input{width:auto;height:auto;margin-top:3px}
.ca-dialog .ca-check{display:flex;gap:8px;align-items:center;font-weight:400;font-size:13px}
.ca-dialog .ca-hint{font-size:12px;color:var(--muted);margin:4px 0 0}
.ca-dialog .ca-error{color:#a12828;background:#fdecec;border-radius:8px;padding:8px 10px;font-size:13px;margin-top:8px}
.ca-dialog .ca-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:14px}
.ca-dialog .ca-actions .btn{height:38px;min-width:0}
.ca-pass-row{display:flex;gap:6px}.ca-pass-row[hidden]{display:none}.ca-pass-row input{flex:1}.ca-pass-row .btn{height:38px;padding:0 12px}
@media(max-width:520px){.ca-dialog .ca-two{grid-template-columns:1fr}}
