
.sales-overview{margin:16px 0;padding:16px;background:#fff;border:1px solid #dce3e8;border-radius:12px;min-width:0}.sales-overview h3{margin:0 0 10px;font-size:16px;color:#2e4b5f}.sales-overview h3 small{font-size:11px;font-weight:400;color:#7a8994;margin-left:8px}.sales-table-scroll{overflow-x:auto}.sales-table{width:100%;border-collapse:collapse;min-width:620px;font-size:12px}.sales-table th,.sales-table td{padding:10px 9px;border-bottom:1px solid #e7edf0;text-align:left;vertical-align:top;white-space:nowrap}.sales-table thead th{background:#f3f7fa;color:#506274;font-weight:600}.sales-table tbody th{color:#304c5d}.sales-summary-table td,.sales-owner-table td{font-variant-numeric:tabular-nums}.sales-detail-table{min-width:1250px}.sales-detail-table td:nth-child(4),.sales-detail-table td:nth-child(11){white-space:normal;min-width:170px}.sales-detail-table button{display:block;margin-top:5px;padding:6px 9px;font-size:11px}.sales-source-cell{display:block;color:#72808b;font-size:10px;line-height:1.5}.sales-overview .hint{margin:10px 0 0}
/* Opportunity summary: keep the three highlighted rows on one baseline. */
.sales-owner-table{min-width:700px}
.sales-owner-table th,.sales-owner-table td{white-space:nowrap!important;text-align:center;vertical-align:middle!important;line-height:1.25}
.sales-owner-table thead th{font-size:11px;letter-spacing:-.02em}
.sales-owner-table tbody th{font-size:12px}
.sales-owner-table .sales-rate{margin-top:3px}
.sales-bar-summary-row th,.sales-bar-total-row th,.sales-bars-grand-total-row th,.sales-bars-grand-total-row td{text-align:center;vertical-align:middle}
@media(max-width:700px){.sales-overview{padding:12px;margin:10px 0}.sales-overview h3{font-size:14px}.sales-overview h3 small{display:block;margin:4px 0 0}.sales-table{font-size:11px}.sales-table th,.sales-table td{padding:8px 7px}.sales-summary-table,.sales-owner-table{min-width:560px}.sales-detail-table{min-width:1250px}}

#sales-panel{min-width:0;max-width:100%}.sales-overview{overflow:hidden}.sales-table-scroll{max-width:100%;overscroll-behavior-x:contain}.sales-group-row th{background:#e8eee6;font-size:14px}.sales-detail-table .sales-next-cell{white-space:normal;min-width:200px;max-width:280px;color:#245c8b;font-weight:600}.sales-detail-table td:last-child{white-space:normal;min-width:170px;max-width:260px}.sales-detail-table details p{white-space:normal;overflow-wrap:anywhere}.sales-detail-table tbody tr:hover{background:#fafbf7}

.sales-rate{display:block;color:#286d4f;font-size:12px;margin-top:4px}.sales-thumbs{display:flex;flex-wrap:wrap;gap:6px;max-width:200px}.sales-thumb{width:52px;height:52px;object-fit:cover;border-radius:5px;border:1px solid #ddd}.sales-drop-zone{display:block;padding:12px;border:1px dashed #728e79;margin-top:10px}.sales-thumbs button{font-size:11px;padding:4px;display:block}#sales-image-editor{border-top:1px solid #ddd;margin-top:14px;padding-top:10px}.sales-detail-table td:nth-child(2){min-width:68px}

.sales-edit-cell{cursor:pointer}.sales-edit-cell:hover,.sales-edit-cell:focus{background:#e8f1e7;outline:1px solid #91a88a}.sales-owner-table button,.sales-summary-table button{font-size:12px;padding:6px 9px}
.sales-bar-summary-row th{background:#dfe9e1;color:#174b3f;font-size:14px;font-weight:700;border-top:2px solid #b9cabd}.sales-bar-columns-row th{background:#f3f7fa;color:#506274;font-size:11px;font-weight:600;letter-spacing:-.02em;text-align:center;vertical-align:middle;border-bottom:1px solid #d7e0e5}.sales-owner-summary-row th{padding-left:24px}.sales-bar-total-row th,.sales-bar-total-row td{background:#f1f5ef;font-weight:700;border-bottom:2px solid #cbd8ce}.sales-table .sales-bars-grand-total-row th,.sales-table .sales-bars-grand-total-row td{background:#174b3f;color:#fff;font-weight:800;border-top:3px solid #0f352d;border-bottom:3px solid #0f352d}.sales-bars-grand-total-row .sales-rate{color:#d9f1e5}.sales-opportunity-bar-row th{background:#174b3f;color:#fff;font-size:15px;letter-spacing:.04em;padding:10px 12px}.sales-opportunity-bar-row+.sales-group-row th{border-top:0}

/* Compact project list: all authorized project messages remain visible. */
.sales-compact-table{min-width:0;width:100%;table-layout:fixed;font-size:13px}
.sales-compact-table .sales-identity-col{width:90px}.sales-compact-table .sales-project-col{width:30%}
.sales-compact-table th,.sales-compact-table td{white-space:normal;overflow-wrap:anywhere;padding:12px 10px;vertical-align:top}
.sales-compact-table td:nth-child(2),.sales-compact-table td:nth-child(4),.sales-compact-table td:last-child{min-width:0;max-width:none}
.sales-compact-table .sales-group-row th{padding:9px 10px;font-size:14px}
.sales-group-heading{display:flex;align-items:center;justify-content:space-between;gap:10px 18px;flex-wrap:wrap}.sales-group-sort{display:flex;align-items:center;gap:8px 16px;font-size:12px;font-weight:500}.sales-group-sort label{display:inline-flex;align-items:center;gap:5px;cursor:pointer;white-space:nowrap}.sales-group-sort input{width:17px;height:17px;margin:0;accent-color:#174b3f}
.sales-compact-table .sales-identity-cell{width:90px}.sales-opportunity-id{display:block;font-size:12px;line-height:1.5;margin-bottom:8px;font-weight:600}
.sales-compact-table .sales-thumbs{max-width:100%;gap:5px}.sales-compact-table .sales-thumb{width:60px;height:60px;object-fit:contain;background:#f6f7f3}
.sales-no-image{font-size:11px;color:#7a8994}.sales-project-title{font-size:15px;font-weight:700;line-height:1.6;white-space:pre-wrap}
.sales-customer{margin:5px 0 8px;color:#526758;line-height:1.6;white-space:pre-wrap}.sales-project-status{display:flex;flex-wrap:wrap;gap:4px 8px;font-size:11px;color:#596e60}
.sales-project-status span{padding:2px 6px;border-radius:4px;background:#edf2e9}
.sales-key-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 10px;margin:12px 0}
.sales-key-facts div{min-width:0}.sales-key-facts dt{font-size:11px;color:#77877c}.sales-key-facts dd{margin:2px 0 0;font-weight:600;line-height:1.5}
.sales-row-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.sales-compact-table .sales-row-actions button{display:inline-block;margin:0;padding:6px 9px;font-size:11px}
.sales-message-cell{line-height:1.65}.sales-followup{padding:8px 10px;background:#f4f7ef;border-radius:6px;margin-bottom:10px}
.sales-followup-date{font-size:11px;color:#64745e}.sales-message-item{margin:0 0 9px;min-width:0}.sales-message-item:last-child{margin-bottom:0}
.sales-message-item>b{font-size:11px;color:#697d70;font-weight:500}.sales-message-item p{margin:1px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;line-height:1.65;max-height:none;overflow:visible}
.sales-next-message{color:#245c8b}.sales-source-message{padding-top:7px;border-top:1px solid #edf0e9;color:#7b877e;font-size:11px}.sales-message-empty{color:#7a8994;font-size:12px;margin:0 0 9px}
.sales-progress-message{padding:6px 8px;background:#eef6ed;border-left:3px solid #5d936b;border-radius:4px;color:#315b3b}
.sales-image-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.sales-image-actions .sales-drop-zone{flex:1 1 280px}
.sales-customer-master-field{grid-column:span 1}.sales-customer-master-controls{display:flex;align-items:center;gap:6px;margin-top:3px}.sales-customer-master-controls input{min-width:0;flex:1}.sales-customer-master-controls button{flex:0 0 auto;min-height:34px;padding:6px 9px;white-space:nowrap}.sales-customer-master-field>small{display:block;margin-top:3px;color:#60766a;line-height:1.4}
@media(max-width:700px){
 .sales-customer-master-controls{align-items:stretch;flex-direction:column}.sales-customer-master-controls button{min-height:44px;width:100%}
 .sales-owner-table .sales-bar-columns-row{display:none!important}
 .sales-opportunity-list{padding:10px}.sales-compact-table{display:block;min-width:0;font-size:13px}.sales-compact-table colgroup,.sales-compact-table thead{display:none}.sales-compact-table tbody{display:block}
 .sales-compact-table .sales-group-row,.sales-compact-table .sales-opportunity-bar-row{display:block}.sales-compact-table .sales-group-row th,.sales-compact-table .sales-opportunity-bar-row th{display:block;border:0}
 .sales-group-heading{align-items:flex-start;gap:8px}.sales-group-sort{width:100%;gap:8px 12px;flex-wrap:wrap}.sales-group-sort label{white-space:normal}
 .sales-compact-table .sales-opportunity-row{display:grid;grid-template-columns:74px minmax(0,1fr);border-bottom:1px solid #dce3e0;padding:12px 0;gap:0 8px}
 .sales-compact-table .sales-opportunity-row td{display:block;border:0;padding:4px 0;min-width:0;max-width:none;width:auto}
 .sales-compact-table .sales-message-cell{grid-column:1/-1;margin-top:6px}.sales-compact-table .sales-group-row th{font-size:13px;padding:8px}
 .sales-compact-table .sales-project-title{font-size:14px}.sales-compact-table .sales-row-actions button{min-height:36px;padding:7px 9px}
 .sales-key-facts{margin:8px 0;gap:5px 8px}.sales-opportunity-id{font-size:11px}.sales-customer{margin:3px 0 6px}
}

/* Same-page project image preview; the original thumbnail and draft stay intact. */
#sales-panel a:has(>img),#sales-dialog a:has(>img){cursor:zoom-in}
#sales-image-preview{box-sizing:border-box;width:max-content;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:36px 10px 10px;border:0;border-radius:10px;background:#fff;overflow:auto;box-shadow:0 14px 60px #0005}
#sales-image-preview::backdrop{background:#102421bb}
#sales-image-preview .sales-image-preview-close{position:absolute;top:3px;right:6px;min-width:32px;min-height:30px;padding:2px 8px;font-size:24px;line-height:1;background:transparent;color:#233d32}
#sales-image-preview .sales-image-preview-picture{display:block;max-width:100%;padding:0;margin:0;border:0;background:transparent;border-radius:0;cursor:zoom-out}
#sales-image-preview img{display:block;width:auto;height:auto;max-width:calc(100vw - 44px);max-height:calc(100dvh - 120px);object-fit:contain;margin:auto}
#sales-image-preview p{margin:8px 0 0;text-align:center;font-size:12px;color:#5d7068}

/* Project content above, one compact action row below. */
#sales-panel .sales-compact-table{display:block;width:100%;min-width:0}
#sales-panel .sales-compact-table colgroup{display:none}
#sales-panel .sales-compact-table thead,#sales-panel .sales-compact-table tbody{display:block}
#sales-panel .sales-compact-table thead tr,#sales-panel .sales-opportunity-row{display:grid;grid-template-columns:90px minmax(0,30%) minmax(0,1fr)}
#sales-panel .sales-opportunity-row>td{width:auto;min-width:0;max-width:none}
#sales-panel .sales-opportunity-row .sales-message-cell{grid-column:3;width:100%;border-top:0;margin-top:0}
#sales-panel .sales-opportunity-row .sales-details-cell{grid-column:1/-1;border-top:1px solid #e5ebe4}
#sales-panel .sales-opportunity-row .sales-project-messages{width:100%;display:block}
#sales-panel .sales-opportunity-row .sales-message-cell .sales-brief-row{grid-template-columns:120px minmax(0,1fr)}
#sales-panel .sales-group-row,#sales-panel .sales-opportunity-bar-row,#sales-panel .sales-group-row th,#sales-panel .sales-opportunity-bar-row th{display:block;width:100%}
#sales-panel .sales-opportunity-row .sales-actions-cell{grid-column:1/-1;border-bottom:1px solid #dce3e0;padding:8px;background:#fafcf8}
#sales-panel .sales-actions-cell .sales-row-actions{display:flex;align-items:center;gap:6px;justify-content:flex-end;flex-wrap:wrap;margin:0;max-width:100%;padding-bottom:2px}
#sales-panel .sales-row-actions button{flex:0 0 auto;white-space:nowrap;font-size:11px;padding:6px 9px;min-height:36px;margin:0}
#sales-panel .sales-row-actions [data-sales-edit]{margin-left:0}
#sales-panel .sales-source-message,#sales-panel .sales-source-message>b,#sales-panel .sales-source-message p{font-size:9.5px;font-weight:400;line-height:1.4;color:#7c897f}
#sales-panel .sales-source-message{margin-top:5px;padding-top:5px;border-top:0}
#sales-image-preview .sales-image-preview-actions{display:flex;justify-content:center;margin-top:8px}
#sales-image-preview [data-sales-preview-delete]{min-height:40px;color:#a63d32;border-color:#dfc9c3;font-size:13px}
#sales-image-preview [data-sales-preview-status]:empty{display:none}
#sales-image-preview [data-sales-preview-status]{color:#9d3c32;font-size:12px}
#sales-image-preview img{max-height:calc(100dvh - 190px)}
@media(max-width:700px){#sales-panel .sales-compact-table thead{display:none}#sales-panel .sales-opportunity-row{grid-template-columns:74px minmax(0,1fr)}#sales-panel .sales-opportunity-row .sales-message-cell{grid-column:1/-1}#sales-panel .sales-opportunity-row .sales-message-cell .sales-brief-row{grid-template-columns:76px minmax(0,1fr)}#sales-panel .sales-row-actions button{font-size:11px;min-height:36px}}

/* Opportunity reference: customer grade once, previous plan above the right action. */
#sales-panel .sales-customer-level{display:inline-block;margin-left:8px;font-weight:600;color:#526758}
#sales-panel .sales-previous-action{padding:0 0 9px;margin:0 0 10px;border-bottom:1px solid #e5ebe4}
#sales-panel .sales-previous-action>b{font-size:12px;color:#657c6d;font-weight:600}
#sales-panel .sales-previous-action>p{font-size:13px;margin-top:5px}
#sales-panel .sales-previous-action>small{display:block;font-size:11px;color:#7c897f;margin-top:4px}
#sales-panel .sales-previous-action .sales-message-empty{margin:4px 0 0}
#sales-panel .sales-opportunity-row .sales-details-cell .sales-brief-row{grid-template-columns:120px minmax(0,1fr)}
@media(max-width:700px){#sales-panel .sales-opportunity-row .sales-details-cell .sales-brief-row{grid-template-columns:76px minmax(0,1fr)}}
.sales-review-lead-list{display:grid;gap:8px;max-height:440px;overflow:auto}
.sales-review-lead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;border:1px solid #d8e5da;border-radius:10px;background:#f8fbf7}
.sales-review-lead>div:first-child{min-width:0}.sales-review-lead strong,.sales-review-lead p,.sales-review-lead small{display:block;overflow-wrap:anywhere}.sales-review-lead p{margin:4px 0;color:#294d41}.sales-review-lead small{color:#5b756a}.sales-review-lead>div:last-child{display:flex;flex-wrap:wrap;gap:6px;flex:none}
@media(max-width:700px){.sales-review-lead{display:block}.sales-review-lead>div:last-child{margin-top:8px}.sales-review-lead button{min-height:44px}}
