.sale-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0;flex-wrap:wrap}
.sale-toolbar>div{display:flex;gap:9px;flex-wrap:wrap}
.sale-toolbar input,.sale-toolbar select{border:1px solid #e0ddd5;background:#fff;border-radius:9px;padding:12px;min-width:140px;max-width:280px}
.sale-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:15px 0 20px}
.sale-metrics article{border:1px solid #e9e4d9;border-radius:13px;padding:18px;background:#fff}
.sale-metrics article:first-child{background:#fffced}.sale-metrics small{font-size:11px;color:#777;display:block;margin-bottom:12px}
.sale-metrics strong{font-size:23px;letter-spacing:-.5px;overflow-wrap:anywhere}
.sale-list tr[data-sale]{cursor:pointer}.sale-list tr[data-sale]:hover{background:#fff9f0}
.sale-notice{font-size:12px;background:#fff5dc;padding:10px;border-radius:8px}
.sale-overlay{position:fixed;inset:0;background:#0009;z-index:1001;display:grid;place-items:center;padding:20px;overflow-y:auto}
.sale-editor{background:#fff;border-radius:19px;padding:26px;max-width:840px;width:100%;max-height:94vh;overflow-y:auto}
.sale-edit-head{display:flex;align-items:start;justify-content:space-between;margin-bottom:20px}.sale-edit-head h2{font-size:23px}
.sale-edit-head button{background:transparent;border:0;font-size:26px;cursor:pointer}
.sale-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.sale-form-grid label{font-size:11px;font-weight:700;color:#5d5b58;display:grid;gap:6px}
.sale-form-grid input,.sale-form-grid select,.sale-form-grid textarea{border:1px solid #dfddd7;border-radius:9px;padding:12px;font:inherit;color:#202020;min-width:0;background:#fff}
.sale-form-grid .sale-wide{grid-column:1/-1}
.sale-form-grid .sale-commission>span{display:flex;align-items:center;gap:8px;font-size:13px;color:#222}
.sale-form-grid .sale-commission input[type=checkbox],.sale-form-grid .sale-managers input[type=checkbox]{width:16px;height:16px;min-width:16px;accent-color:#ed5432}
.sale-form-grid fieldset.sale-wide{border:1px solid #dfddd7;border-radius:9px;padding:12px;min-width:0}
.sale-form-grid fieldset.sale-wide legend{font-weight:700;color:#5d5b58}
.sale-managers{display:flex;gap:8px 16px;flex-wrap:wrap;margin-top:12px}
.sale-form-grid .sale-managers label{display:flex;align-items:center;gap:6px;font-size:12px}
.sale-intermediary-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(100px,1fr) auto;gap:8px;margin:10px 0}
#saleInflationPreview{font-weight:700;color:#322f2b;margin:12px 0 0}
@media(max-width:600px){.sale-intermediary-row{grid-template-columns:1fr}}
.sale-edit-foot{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-top:20px}.sale-edit-foot small{font-size:11px;color:#888;max-width:410px}
.sale-edit-foot>div{display:flex;gap:9px}
@media(max-width:850px){.sale-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.sale-edit-foot{flex-direction:column;align-items:stretch}}
@media(max-width:550px){.sale-form-grid{grid-template-columns:1fr}.sale-metrics strong{font-size:19px}}

/* Mobile-only sales explorer: desktop table and dashboard remain unchanged. */
.sale-mobile-list{display:none}
@media(max-width:700px){
  .sale-list .crm-table{display:none}
  .sale-mobile-list{display:block;border:1px solid #e8e6e1;border-radius:13px;background:#fff;overflow:hidden}
  .sale-mobile-item+.sale-mobile-item{border-top:1px solid #eeece8}
  .sale-mobile-toggle{display:block;width:100%;background:#fff;border:0;color:#242424;text-align:left;padding:16px 14px;cursor:pointer;font:inherit}
  .sale-mobile-toggle:focus-visible{outline:2px solid #ed5432;outline-offset:-3px}
  .sale-mobile-meta,.sale-mobile-row{display:flex;justify-content:space-between;gap:12px}
  .sale-mobile-meta{align-items:center;margin-bottom:12px;font-size:11px;color:#8a8983;font-weight:650}
  .sale-mobile-status{flex-shrink:0;max-width:56%;border-radius:999px;padding:5px 9px;font-size:10px;line-height:1.3;font-weight:700;text-align:center}
  .sale-status-success{color:#277744;background:#e8f5eb}
  .sale-status-warning{color:#996500;background:#fff4d8}
  .sale-status-danger{color:#b73336;background:#fbe8e7}
  .sale-mobile-row{align-items:center}
  .sale-mobile-details{min-width:0;flex:1;display:flex;flex-direction:column;gap:5px}
  .sale-mobile-details strong{font-size:14px;line-height:1.3;overflow-wrap:anywhere}
  .sale-mobile-details small{font-size:12px;color:#777;line-height:1.35;overflow-wrap:anywhere}
  .sale-mobile-amounts{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:5px;white-space:nowrap;font-variant-numeric:tabular-nums}
  .sale-mobile-amounts strong{font-size:15px;letter-spacing:-.3px;color:#222}
  .sale-mobile-amounts em{font-style:normal;font-size:13px;font-weight:700;color:#268348}
  .sale-mobile-chevron{font-size:15px;line-height:1;color:#999}
  .sale-mobile-expanded{padding:13px 14px 16px;background:#f8f7f4;border-top:1px solid #eeece8;display:grid;gap:11px}
  .sale-mobile-expanded>div{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px}
  .sale-mobile-expanded>div span{color:#777}
  .sale-mobile-expanded>div strong{font-size:12px;font-variant-numeric:tabular-nums}
  .sale-mobile-expanded>.btn{width:100%;margin-top:4px}
  .sale-mobile-empty{padding:18px;font-size:13px;color:#777}
  .sale-list>.directory-top{gap:10px;flex-wrap:wrap}
  .sale-list>.directory-top .directory-protection{font-size:11px}
}


/* Shared desktop/mobile sale editor improvements */
.sale-form-grid .sale-intermediary-toggle{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:700;color:#242424;cursor:pointer;min-height:44px}
.sale-intermediary-toggle input{width:22px;height:22px;min-width:22px;accent-color:#ed5432;cursor:pointer}
.sale-form-grid #saleIntermediaryControls[hidden],.sale-form-grid .sale-managers label[hidden]{display:none!important}
#saleIntermediaryBlock{background:#fffdf9;border-color:#edd9cb}
.sale-tax-preview{display:grid;grid-template-columns:1fr auto;grid-column:1/-1;align-items:center;gap:7px 14px;border:1px solid #e8e4dc;background:#f9f8f5;border-radius:10px;padding:12px;font-size:12px;color:#777}
.sale-tax-preview strong{color:#262626;text-align:right;font-size:14px;font-variant-numeric:tabular-nums}
.sale-rate-row{display:flex;gap:8px;align-items:stretch}.sale-rate-row input{flex:1;min-width:0}.sale-rate-row .btn{flex-shrink:0;white-space:nowrap}
.sale-rate-row input[readonly]{background:#f4f4f1;color:#4a4946}
.sale-form-grid .sale-managers{display:flex;flex-direction:column;max-height:200px;overflow-y:auto;gap:0;border:1px solid #e5e2dc;border-radius:10px;margin-top:8px}
.sale-form-grid .sale-managers label{display:flex;align-items:center;min-height:44px;padding:9px 11px;border-bottom:1px solid #f0ede8;font-size:12px;cursor:pointer}
.sale-form-grid .sale-managers label:last-child{border-bottom:0}
.sale-form-grid .sale-managers label:has(input:checked){background:#fff5ef;color:#9a321b}
#saleManagerSearch{width:100%;margin-top:10px}
.sale-money-input{font-variant-numeric:tabular-nums}
@media(max-width:600px){.sale-rate-row{flex-wrap:wrap}.sale-rate-row button{min-height:44px}}

/* Collapsible intermediary editor — shared desktop and mobile */
.sale-form-grid .sale-intermediary-card{grid-column:1/-1;border:1px solid #e9dfd3;border-radius:15px;background:#fffdf9;min-width:0;overflow:hidden}
.sale-intermediary-head{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;padding:17px 20px;border:0;background:transparent;text-align:left;color:#26231f;cursor:pointer}
.sale-intermediary-head:hover{background:#fbf5ee}
.sale-intermediary-head:focus-visible{outline:2px solid #e95837;outline-offset:-3px}
.sale-intermediary-head-copy{display:grid;gap:4px;min-width:0}
.sale-intermediary-head-copy strong{font-size:15px;font-weight:750}
.sale-intermediary-head-copy small{font-size:12px;color:#8b6c57;font-weight:500;line-height:1.4;overflow-wrap:anywhere}
.sale-intermediary-chevron{width:30px;height:30px;flex:0 0 30px;border:1px solid #e6d9cb;border-radius:50%;display:grid;place-items:center;font-size:22px;transition:transform .18s}
.sale-intermediary-head[aria-expanded="true"] .sale-intermediary-chevron{transform:rotate(180deg)}
.sale-intermediary-body{padding:17px 20px 20px;border-top:1px solid #eee5da;display:grid;gap:13px}
.sale-form-grid .sale-intermediary-body[hidden]{display:none!important}
.sale-intermediary-body>small{color:#78736d;font-size:12px;line-height:1.5}
.sale-form-grid .sale-intermediary-body>label:not(.sale-intermediary-toggle){display:grid;gap:8px}
#saleIntermediaryRows{display:grid;gap:8px}
#saleIntermediaryRows p{margin:0;border:1px solid #e8e4dd;border-radius:10px;background:#fff;padding:12px;line-height:1.5;font-size:12px;color:#4b4946;overflow-wrap:anywhere}
#saleIntermediaryRows:empty{display:none}
#saleAddIntermediary{justify-self:start}
#saleInflationPreview{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:14px;border-radius:11px;background:#f7f4ef;border:1px solid #ece6dc;margin:0;font-size:12px;font-weight:500}
#saleInflationPreview span{color:#79736b}
#saleInflationPreview strong{text-align:right;font-size:12px;color:#272522;font-variant-numeric:tabular-nums}
#saleInflationPreview strong:last-child{color:#247a49}
@media(max-width:600px){.sale-intermediary-head{padding:15px}.sale-intermediary-body{padding:15px}.sale-intermediary-row{grid-template-columns:minmax(0,1fr)}#saleAddIntermediary{width:100%}}

/* Notion-style searchable people/contact picker */
.sale-person-picker{position:relative;display:block;min-width:0}
.sale-form-grid .sale-person-picker>input{display:block;width:100%;min-height:45px;padding-right:36px}
.sale-person-picker:after{content:'⌕';position:absolute;right:13px;top:9px;color:#a4a09a;font-size:21px;pointer-events:none}
.sale-person-list{position:absolute;z-index:25;top:calc(100% + 5px);left:0;right:0;max-height:242px;overflow-y:auto;border:1px solid #e2ddd5;border-radius:12px;background:#fff;box-shadow:0 16px 40px #29231e24;padding:5px}
.sale-person-list[hidden]{display:none}
.sale-person-list button{display:block;width:100%;border:0;border-radius:8px;background:transparent;text-align:left;font:inherit;font-size:12px;font-weight:600;color:#272522;line-height:1.45;padding:11px;cursor:pointer;white-space:normal;overflow-wrap:anywhere}
.sale-person-list button:hover,.sale-person-list button:focus-visible{background:#f7f1e9;outline:none}
.sale-person-list p{margin:0;padding:12px;color:#8b8780;font-size:12px}

/* Campaign expense drawer */
.sale-expense-card{margin-top:4px}
.sale-expense-list{display:grid;gap:8px}
.sale-expense-entry{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;border:1px solid #e9dfd3;background:#fff;border-radius:10px}
.sale-expense-entry small{display:block;color:#82776d;margin-top:4px}
.sale-expense-empty{padding:14px;border:1px dashed #e3d8ca;border-radius:10px;color:#7e766e}
.sale-expense-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.sale-expense-summary>div{padding:13px;border-radius:10px;background:#fff2e9;display:grid;gap:5px}
.sale-expense-summary small{font-size:12px;color:#8a6d5b}.sale-expense-summary strong{font-size:16px}
.sale-expense-add{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;border-top:1px solid #e9dfd3;padding-top:14px}
.sale-expense-add label{display:grid;gap:6px}.sale-expense-add .btn{grid-column:1/-1;justify-self:start}
@media(max-width:600px){.sale-expense-summary,.sale-expense-add{grid-template-columns:1fr}.sale-expense-entry{align-items:start}}

/* Ventas V2 — listado compacto y detalle por secciones */
.sale-v2-heading{margin:8px 0 12px}
.sale-v2-heading span{font-size:11px;letter-spacing:.14em;color:#e95738;font-weight:800}
.sale-v2-heading h2{margin:4px 0;font-size:26px;letter-spacing:-.04em}
.sale-v2-heading p{font-size:13px;color:#898680;margin:0}
.sale-v2-toolbar{margin:14px 0 20px}
.sale-v2-toolbar>div{flex:1}
.sale-v2-toolbar #saleAgency{max-width:190px}
.sale-v2-toolbar #saleSearch{flex:1;max-width:410px;min-width:180px}
.sale-metrics article{border-radius:16px;min-width:0}
.sale-metrics strong{white-space:nowrap;overflow-wrap:normal;font-size:clamp(18px,1.7vw,25px);letter-spacing:-.04em}
.sale-v2-table{overflow-x:auto}
.sale-v2-table table{width:100%;min-width:680px;border-collapse:collapse}
.sale-v2-table th{text-transform:uppercase;letter-spacing:.06em;font-size:10px;color:#9e9991;white-space:nowrap;padding:13px 12px;text-align:left}
.sale-v2-table td{padding:18px 12px;vertical-align:middle}
.sale-v2-table th:first-child,.sale-v2-table td:first-child{width:36%}
.sale-v2-table th:nth-child(3),.sale-v2-table th:nth-child(4){text-align:right}
.sale-v2-name,.sale-v2-subtitle,.sale-v2-talent{display:block;line-height:1.5}
.sale-v2-name{font-weight:750;font-size:13px;color:#252422}
.sale-v2-subtitle{font-size:11px;color:#89857e;margin-top:3px}
.sale-v2-talent{font-size:11px;color:#aaa39a}
.sale-v2-type{background:#f2f0eb;border-radius:7px;padding:5px 8px;font-weight:800;font-size:10px;color:#615b54}
.sale-v2-number{text-align:right;white-space:nowrap;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.sale-v2-positive{color:#247d4a}
.sale-v2-open{font-size:24px;color:#ada89f}
.sale-v2-table .sale-mobile-status{display:inline-block;border-radius:999px;padding:6px 10px;font-size:10px;font-weight:700}
.sale-v2-table tr[data-sale]:hover{background:#fff9f2}
.sale-overlay{display:flex;justify-content:flex-end;align-items:stretch;padding:0;background:#17151188}
.sale-v2-editor{max-width:780px;width:min(780px,100%);height:100dvh;max-height:100dvh;border-radius:20px 0 0 20px;padding:0;display:flex;flex-direction:column;box-shadow:-18px 0 65px #0002}
.sale-v2-editor .sale-edit-head{padding:20px 26px;margin:0;border-bottom:1px solid #eee8e0;flex-shrink:0}
.sale-v2-editor>.sale-form-grid{padding:22px 26px;overflow-y:auto;flex:1;align-content:start}
.sale-v2-editor>.sale-edit-foot{padding:16px 26px;margin:0;border-top:1px solid #eee8e0;flex-shrink:0;background:#fff}
.sale-v2-section{border:1px solid #e7e2da;border-radius:13px;min-width:0}
.sale-v2-section>summary{list-style:none;display:flex;justify-content:space-between;align-items:center;cursor:pointer;padding:17px}
.sale-v2-section>summary::-webkit-details-marker{display:none}
.sale-v2-section>summary strong{font-size:14px}
.sale-v2-section>summary span{font-size:20px;color:#aaa}
.sale-v2-section[open]>summary{border-bottom:1px solid #eee9e3}
.sale-v2-section[open]>summary span{transform:rotate(180deg)}
.sale-v2-section-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;padding:17px}
.sale-v2-section-body>.sale-wide{grid-column:1/-1}
@media(max-width:850px){.sale-v2-toolbar>div{width:100%}.sale-v2-toolbar #saleAgency,.sale-v2-toolbar #saleSearch{max-width:none}}
@media(max-width:700px){.sale-v2-heading h2{font-size:23px}.sale-v2-toolbar #saleAgency,.sale-v2-toolbar #saleSearch,.sale-v2-toolbar #saleStatus{width:100%;max-width:none}.sale-metrics strong{font-size:18px}.sale-v2-editor{max-width:100%;border-radius:0}.sale-v2-editor .sale-edit-head{padding:16px}.sale-v2-editor>.sale-form-grid{padding:14px}.sale-v2-editor>.sale-edit-foot{padding:12px}.sale-v2-section-body{grid-template-columns:1fr}.sale-v2-table{display:none}}

/* Ventas V2 refinement — independent intermediaries and three status chips */
.sale-v2-section[data-section="intermediaries"] .sale-intermediary-head{display:none}
.sale-v2-section[data-section="intermediaries"] #saleIntermediaryBlock{border:0;background:transparent;margin:0}
.sale-v2-section[data-section="intermediaries"] #saleIntermediaryBody{display:grid;border:0;padding:0}
.sale-v2-section[data-section="intermediaries"] .sale-v2-section-body{grid-template-columns:1fr}
.sale-v2-table th:nth-child(3){max-width:180px;white-space:normal;line-height:1.3}
.sale-mobile-status{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 11px;font-size:11px;font-weight:750;line-height:1.3;white-space:nowrap}
.sale-mobile-status:before{display:inline-block;font-size:12px;line-height:1;font-weight:900}
.sale-status-success{color:#257647;background:#eaf7ef;border:1px solid #c9e8d2}
.sale-status-success:before{content:"✓"}
.sale-status-warning{color:#9e6600;background:#fff6e6;border:1px solid #f4dfa8}
.sale-status-warning:before{content:"!"}
.sale-status-danger{color:#bd3431;background:#fff0ef;border:1px solid #f3cdca}
.sale-status-danger:before{content:"×"}
@media(max-width:700px){.sale-mobile-status{max-width:62%;white-space:normal}}

/* Sales status pills and accessible custom status pickers */
.sale-mobile-status,.sale-chip{display:inline-flex;align-items:center;gap:6px;width:max-content;max-width:100%;padding:7px 13px;border-radius:999px;font-size:12px;line-height:1.25;font-weight:750;white-space:normal}
.sale-mobile-status:before,.sale-chip:before{display:inline-flex;align-items:center;justify-content:center;flex:0 0 15px;width:15px;height:15px;border-radius:100%;font-size:12px;font-weight:900}
.sale-status-success{color:#237543;background:#e9f7ee;border:1px solid #c6e8d1}
.sale-status-success:before{content:"✓";font-size:14px}
.sale-status-warning{color:#9e690a;background:#fff5df;border:1px solid #f1dca7}
.sale-status-warning:before{content:"!";border:1.6px solid currentColor;font-size:10px}
.sale-status-danger{color:#b63835;background:#fff0ef;border:1px solid #f2c9c7}
.sale-status-danger:before{content:"×";border:1.6px solid currentColor;font-size:12px}
.sale-status-neutral{color:#655f56;background:#f4f2ee;border:1px solid #e3ded5}
.sale-status-neutral:before{content:"·";font-size:17px}
.sale-chip-picker{position:relative;min-width:0;display:block}
.sale-chip-native{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;padding:0!important;pointer-events:none!important;min-width:0!important;border:0!important}
.sale-chip-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;width:100%;background:#fff;border:1px solid #e1ddd6;border-radius:10px;padding:7px 12px;cursor:pointer;text-align:left}
.sale-chip-trigger:hover,.sale-chip-trigger:focus-visible{border-color:#e95738;outline:2px solid #ef58342a}
.sale-chip-trigger>.sale-chip{pointer-events:none}
.sale-chip-caret{font-size:21px;color:#8a867f;line-height:1}
.sale-chip-options{position:absolute;z-index:55;top:calc(100% + 6px);left:0;right:0;min-width:220px;background:#fff;border:1px solid #e3dfd8;border-radius:12px;box-shadow:0 18px 40px #26221d2e;padding:6px;display:grid;gap:3px}
.sale-chip-options[hidden]{display:none!important}
.sale-chip-options button{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:44px;border:0;border-radius:8px;padding:7px 10px;background:transparent;text-align:left;cursor:pointer}
.sale-chip-options button:hover,.sale-chip-options button:focus-visible{background:#faf6f0;outline:0}
.sale-chip-selected{color:#ca4b2d;font-size:16px;font-weight:800}
.sale-chip-filter{min-width:200px}
.sale-v2-toolbar .sale-chip-filter{max-width:280px}
.sale-v2-toolbar .sale-chip-trigger{min-height:46px}
.sale-v2-save-error{margin:12px 26px 0;padding:12px 14px;background:#fff0ef;color:#aa352b;border:1px solid #f1c8c1;border-radius:10px;font-size:13px;font-weight:650}
@media(max-width:700px){.sale-v2-toolbar .sale-chip-filter{max-width:none;width:100%}.sale-v2-save-error{margin:10px 14px 0}}

/* Status chips: minimal matching-color dot instead of symbolic icons. */
.sale-mobile-status:before,.sale-chip:before{content:""!important;display:inline-block!important;width:7px!important;height:7px!important;flex:0 0 7px!important;border:0!important;border-radius:50%!important;font-size:0!important;background:currentColor!important}
.sale-status-neutral:before{background:#8c877f!important}

/* Fine-tune status dot spacing for desktop, mobile, and dropdowns. */
.sale-mobile-status,.sale-chip{column-gap:10px!important}
.sale-mobile-status:before,.sale-chip:before{width:4px!important;height:4px!important;flex:0 0 4px!important;margin-right:1px!important}

/* Mantener el mismo componente de estatus en tabla y editor. */
.sale-mobile-status,.sale-chip{column-gap:7.5px!important}
.sale-v2-table .sale-mobile-status{display:inline-flex!important;align-items:center!important;column-gap:7.5px!important;padding:7px 13px!important;font-size:12px!important;font-weight:750!important;line-height:1.25!important;white-space:nowrap}

/* Existing intermediary requests: editable while preserving the linked CxP. */
.sale-intermediary-existing .sale-intermediary-linked{font-size:11px;line-height:1.45;color:#997149;align-self:center;overflow-wrap:anywhere}
.sale-intermediary-existing select,.sale-intermediary-existing input{min-width:0}
@media(max-width:600px){.sale-intermediary-existing .sale-intermediary-linked{grid-column:1/-1}}

/* Financial-edit CTA: the reapproval warning appears on demand, not on every row. */
.sale-intermediary-existing .sale-edit-intermediary{white-space:nowrap;min-height:42px}
.sale-intermediary-existing [data-vendor]:disabled,.sale-intermediary-existing [data-budget]:disabled{opacity:1;color:#57534e;background:#faf9f7;cursor:default}
.sale-expense-entry>div{flex:1;min-width:0}
.sale-expense-edit-trigger{flex:0 0 auto;white-space:nowrap}
@media(max-width:600px){.sale-expense-entry{flex-wrap:wrap}.sale-expense-edit-trigger{margin-left:auto}}

/* CxP intermediary inline editing dialog */
.sale-cxp-status{display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:700;white-space:nowrap;line-height:1.25;border:1px solid transparent}
.sale-cxp-approved{color:#207944;background:#e8f7ee;border-color:#bfe8cc}
.sale-cxp-pending{color:#a06a0b;background:#fff6df;border-color:#f4dc98}
.sale-cxp-rejected{color:#b53a35;background:#fff0ef;border-color:#f5c2bd}
.sale-intermediary-existing{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.sale-intermediary-existing [data-vendor]{flex:2 1 190px;min-width:0}
.sale-intermediary-existing [data-budget]{flex:1 1 130px;min-width:0}
.sale-cxp-edit-overlay{position:fixed;inset:0;z-index:99999;background:rgba(20,20,20,.52);display:flex;align-items:center;justify-content:center;padding:18px}
.sale-cxp-edit-dialog{background:white;color:#222;border:1px solid #e8e2d9;border-radius:22px;width:min(100%,510px);max-height:90vh;overflow:auto;box-shadow:0 24px 80px #0003}
.sale-cxp-edit-head{display:flex;align-items:flex-start;justify-content:space-between;padding:28px 30px 18px;border-bottom:1px solid #eee8e0}
.sale-cxp-edit-head h3{font-size:25px;margin:8px 0 0;line-height:1.2}
.sale-cxp-edit-eyebrow{font-size:11px;letter-spacing:.16em;font-weight:800;color:#ed5036}
.sale-cxp-close{background:none;border:0;color:#555;font-size:30px;cursor:pointer;line-height:1}
.sale-cxp-edit-form{padding:25px 30px 30px;display:grid;gap:17px}
.sale-cxp-edit-form label{display:grid;gap:8px;font-size:13px;font-weight:700;color:#514d49}
.sale-cxp-edit-form select,.sale-cxp-edit-form input{width:100%;box-sizing:border-box;height:52px;border-radius:12px;padding:0 14px;border:1px solid #ddd7ce;background:#fff;font:inherit;color:#242424}
.sale-cxp-edit-form select:focus,.sale-cxp-edit-form input:focus{outline:none;border-color:#ee5038;box-shadow:0 0 0 3px #ee503824}
.sale-cxp-current{display:flex;align-items:center;gap:12px;font-size:13px;font-weight:700;color:#777}
.sale-cxp-edit-advice{font-size:13px;line-height:1.5;color:#896349;background:#fff6f0;border:1px solid #f3ded1;padding:12px 14px;border-radius:12px;margin:0}
.sale-cxp-edit-error{padding:10px 12px;border-radius:10px;color:#a12822;background:#fff1ef;margin:0;font-size:13px}
.sale-cxp-edit-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:5px}
.sale-cxp-edit-actions .btn.primary{background:#ee5038;color:white;border-color:#ee5038}
@media(max-width:600px){.sale-cxp-edit-dialog{border-radius:18px}.sale-cxp-edit-head{padding:22px 20px 16px}.sale-cxp-edit-form{padding:20px}.sale-cxp-edit-actions .btn{flex:1}}

/* Show the starting budget beside the available amount in campaign expense cards. */
.sale-expense-summary .sale-expense-initial{display:block;font-size:12px;color:#927765;font-weight:500;line-height:1.35}
.sale-expense-summary>div{align-content:start;gap:5px}
.sale-expense-summary>div strong{font-variant-numeric:tabular-nums}

/* Campaign expense VAT selection and payable preview */
.sale-expense-add .sale-expense-vat-choice{grid-column:1/-1;display:flex;align-items:center;gap:12px;font-weight:700;border:1px solid #e9dfd3;border-radius:12px;padding:12px 14px;background:#fffaf6;cursor:pointer}
.sale-expense-vat-choice input{width:19px;height:19px;accent-color:#ed5037;flex:0 0 auto}
.sale-expense-vat-choice span{display:grid;gap:4px}
.sale-expense-vat-choice small{font-weight:500;color:#867264}
.sale-expense-amount{display:grid;justify-items:end;gap:4px}
.sale-expense-amount>small{font-size:11px;color:#927a69;text-align:right}
@media(max-width:600px){.sale-expense-amount{justify-items:start}.sale-expense-amount>small{text-align:left}}

/* Direct, editable campaign expense dialog: no preliminary confirmation. */
.sale-expense-edit-dialog .sale-cxp-edit-form{gap:15px}
.sale-expense-edit-dialog .sale-expense-edit-vat{display:flex;align-items:center;gap:12px;border:1px solid #eadfd6;background:#fff8f3;border-radius:12px;padding:13px 14px;cursor:pointer}
.sale-expense-edit-dialog .sale-expense-edit-vat input{width:18px;height:18px;accent-color:#ed5038;flex:none}
.sale-expense-edit-dialog .sale-expense-edit-tax{background:#f8f5f0;border-radius:10px;padding:10px 13px;color:#53493f;font-size:13px;font-weight:700}

/* Sales recorded in MXN with optional foreign-currency contract reference */
.sale-fx-panel{display:grid;grid-template-columns:1fr;gap:12px;padding:16px;border:1px solid #eae1d7;border-radius:14px;background:#fffaf6}
.sale-fx-heading{display:grid;gap:5px}
.sale-fx-heading strong{font-size:15px}
.sale-fx-heading small,.sale-fx-panel>small{font-size:12px;color:#877466}
.sale-fx-panel label{display:grid;gap:7px;font-size:12px;font-weight:700;color:#58514a}
.sale-fx-panel input,.sale-fx-panel select{min-height:45px;background:white;border:1px solid #dfd8ce;border-radius:10px;padding:10px 12px;font:inherit;color:#242424;box-sizing:border-box;width:100%}
.sale-fx-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.sale-fx-fields[hidden]{display:none}
.sale-fx-panel input:focus,.sale-fx-panel select:focus{outline:none;border-color:#ed5038;box-shadow:0 0 0 3px #ed503819}
.sale-editor input[name="amount"][readonly]{background:#f8f5f0;color:#2b2825}
@media(max-width:650px){.sale-fx-fields{grid-template-columns:1fr}}

/* Presupuesto bidireccional: subtotal, talento y participaciones (desktop / mobile) */
.sale-budget-entry{display:grid;gap:12px;min-width:0}
.sale-budget-duo,.sale-budget-shares{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.sale-budget-entry label{display:grid;gap:7px;font-size:12px;font-weight:700;color:#58514a;min-width:0}
.sale-budget-entry input{box-sizing:border-box;width:100%;min-width:0}
.sale-budget-entry label small,.sale-budget-entry>small{color:#877466;font-size:11px;font-weight:500}
.sale-budget-shares{padding:14px;border:1px solid #eae1d7;border-radius:12px;background:#fffaf6}
.sale-budget-shares .sale-rate-row{display:flex;gap:8px}
.sale-budget-shares .sale-rate-row input{min-width:0;flex:1}
.sale-budget-shares .sale-rate-row button{white-space:nowrap}
#saleBudgetError:not([hidden]){display:block;color:#b63123;font-weight:700}
.sale-fx-panel select{appearance:none;-webkit-appearance:none;padding-right:52px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23333333' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 20px center;background-size:20px}
.sale-v2-section>summary{padding-right:30px}
@media(max-width:650px){.sale-budget-duo,.sale-budget-shares{grid-template-columns:1fr}.sale-budget-shares{padding:12px}}

/* Pérdidas comerciales: el pago al talento puede superar el subtotal */
#saleBudgetLoss:not([hidden]){display:block;padding:10px 12px;border:1px solid #f2c5b9;border-radius:9px;background:#fff4ef;color:#a83825;font-size:12px;font-weight:700}

/* Client inline creation: cancellable without changing current selection */
#saleClientNew:not([hidden]){display:flex;align-items:stretch;gap:8px;flex-wrap:wrap}
#saleClientNew[hidden]{display:none}
#saleClientNewName{flex:1 1 180px;min-width:0}
#saleCreateCancel{white-space:nowrap}
@media(max-width:600px){#saleClientNew:not([hidden]){display:grid;grid-template-columns:1fr 1fr}#saleClientNewName{grid-column:1/-1;width:100%}}

/* Read-only sale summary before entering the editor */
.sale-summary-overlay{z-index:1200;padding:20px;display:flex;justify-content:center;align-items:center}
.sale-summary-modal{width:min(760px,100%);max-height:min(90vh,980px);display:flex;flex-direction:column;background:#fff;border-radius:22px;box-shadow:0 28px 90px #0003;overflow:hidden}
.sale-summary-header{padding:27px 31px 22px;border-bottom:1px solid #eee5de;display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.sale-summary-header small{display:block;margin-bottom:9px;font-size:11px;font-weight:800;color:#ed5338;letter-spacing:.13em}
.sale-summary-header h2{font-size:25px;line-height:1.2;margin:0 0 9px;overflow-wrap:anywhere}
.sale-summary-header p{margin:0;color:#8a8179;font-size:13px}
.sale-summary-close{border:0;background:transparent;font-size:30px;font-weight:500;line-height:1;cursor:pointer;padding:0 3px;color:#34302e}
.sale-summary-content{min-height:0;overflow-y:auto;padding:22px 31px}
.sale-summary-meta{display:flex;align-items:center;gap:8px;margin-bottom:18px}
.sale-summary-rows{border:1px solid #eee6de;border-radius:15px;overflow:hidden}
.sale-summary-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,auto);align-items:center;gap:18px;padding:13px 17px;border-bottom:1px solid #f2ece6;font-size:13px}
.sale-summary-row:last-child{border-bottom:0}
.sale-summary-row>span{color:#736e67}
.sale-summary-row>strong{max-width:320px;text-align:right;overflow-wrap:anywhere;color:#252323;font-weight:750}
.sale-summary-row .sale-summary-emphasis{color:#23784b}
.sale-summary-row .sale-summary-loss{color:#bf352a}
.sale-summary-loading{color:#8a8179;padding:28px;text-align:center}
.sale-summary-error{padding:15px;background:#fff1ee;color:#b63429;border-radius:11px}
.sale-summary-actions{display:flex;justify-content:flex-end;gap:10px;padding:17px 31px;border-top:1px solid #eee5de;background:#fff}
@media(max-width:700px){.sale-summary-overlay{padding:0}.sale-summary-modal{height:100dvh;max-height:100dvh;width:100%;border-radius:0}.sale-summary-header{padding:22px 19px 18px}.sale-summary-header h2{font-size:21px}.sale-summary-content{padding:17px}.sale-summary-row{grid-template-columns:1fr;gap:5px}.sale-summary-row>strong{text-align:left;max-width:none}.sale-summary-actions{padding:15px 19px}.sale-summary-actions .btn{flex:1}}

/* Compact subtotal headers with a dedicated talent payout column */
.sale-v2-table table{min-width:920px;table-layout:fixed}
.sale-v2-table th:first-child,.sale-v2-table td:first-child{width:33%}
.sale-v2-table th:nth-child(2),.sale-v2-table td:nth-child(2){width:9%;white-space:nowrap}
.sale-v2-table th:nth-child(3),.sale-v2-table td:nth-child(3){width:12%}
.sale-v2-table th:nth-child(4),.sale-v2-table td:nth-child(4){width:13%;text-align:right}
.sale-v2-table th:nth-child(5),.sale-v2-table td:nth-child(5){width:13%;text-align:right}
.sale-v2-table th:nth-child(6),.sale-v2-table td:nth-child(6){width:16%}
.sale-v2-table th:nth-child(7),.sale-v2-table td:nth-child(7){width:4%}
.sale-v2-table th:nth-child(3){max-width:none;white-space:normal;line-height:1.3}
.sale-v2-table th:nth-child(4),.sale-v2-table th:nth-child(5){white-space:normal;line-height:1.3}
.sale-v2-table .sale-v2-type{display:inline-flex;white-space:nowrap;align-items:center}
.sale-v2-table .sale-table-negative{color:#be352a}

/* Consistent heading alignment across the seven sales columns */
.sale-v2-table thead th,.sale-v2-table thead th:nth-child(3),.sale-v2-table thead th:nth-child(4),.sale-v2-table thead th:nth-child(5){text-align:center;vertical-align:middle}

/* Align each header with its own column values, not just the header row */
.sale-v2-table thead th:first-child{text-align:left}
.sale-v2-table thead th:not(:first-child){text-align:center}
.sale-v2-table tbody td:nth-child(n+2){text-align:center}
.sale-v2-table tbody td.sale-v2-number{text-align:center}
.sale-v2-table tbody td:nth-child(6) .sale-mobile-status{margin-inline:auto}
.sale-v2-table tbody td:nth-child(7){text-align:center}

/* Immutable sale reference: visually distinguish it from editable fields. */
.sale-form-grid input:disabled{background:#f0efec;color:#77736e;border-color:#dedbd5;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#77736e}

/* Consistent dropdown and accordion chevron spacing in sales forms. */
.sale-form-grid select:not(.sale-chip-native),.sale-fx-panel select{appearance:none;-webkit-appearance:none;background-color:#fff;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:20px 20px;background-position:right 22px center;padding-right:54px}
.sale-v2-section>summary{padding-right:26px}
.sale-v2-section>summary span{width:24px;min-width:24px;display:inline-flex;align-items:center;justify-content:center;line-height:1}

/* Searchable campaign relation picker inspired by Notion. */
.sale-form-grid select.sale-campaign-native{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;padding:0;border:0}
.sale-campaign-relation{position:relative;min-width:0}
.sale-campaign-trigger{width:100%;min-height:48px;display:flex;align-items:center;gap:10px;text-align:left;padding:11px 16px;border:1px solid #dedbd5;border-radius:10px;background:#fff;color:#242321;font:inherit;font-weight:650;cursor:pointer}
.sale-campaign-trigger>span:nth-child(2){flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sale-campaign-page-icon{flex:0 0 22px;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border-radius:5px;background:#f4f1ec;color:#8b8176;font-size:17px}
.sale-campaign-chevron{margin-left:auto;color:#777;font-size:21px;line-height:1}
.sale-campaign-trigger:hover,.sale-campaign-trigger[aria-expanded=true]{border-color:#a9a39b;background:#fffdfa}
.sale-campaign-popover{position:absolute;z-index:120;top:calc(100% + 7px);left:0;width:100%;min-width:min(400px,90vw);border:1px solid #e7e0d8;border-radius:12px;background:#fff;box-shadow:0 16px 40px #221b1426;padding:9px}
.sale-campaign-popover[hidden]{display:none}
.sale-form-grid .sale-campaign-popover input[type=search]{width:100%;background:#fff;border:1px solid #dedbd5;border-radius:8px;padding:11px 13px;font-size:13px}
.sale-campaign-results{max-height:270px;overflow-y:auto;padding-top:8px}
.sale-campaign-caption{font-size:11px;font-weight:650;color:#827a72;padding:8px 9px}
.sale-campaign-option{border:0;background:#fff;border-radius:7px;width:100%;text-align:left;display:flex;align-items:center;gap:10px;padding:10px 9px;color:#282624;font:inherit;font-weight:550;cursor:pointer}
.sale-campaign-option>span:nth-child(2){flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sale-campaign-option:hover,.sale-campaign-option.selected{background:#f7f2ee}
.sale-campaign-check{margin-left:auto;color:#e95535;font-weight:800}
.sale-campaign-empty{font-size:12px;color:#817b73;padding:10px}
@media(max-width:650px){.sale-campaign-popover{min-width:0;width:100%}}

/* Sales toolbar filters: consistent breathing room for both chevrons. */
.sale-v2-toolbar select#saleAgency{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 20px center;background-size:20px 20px;padding-right:52px}
.sale-v2-toolbar .sale-chip-trigger{padding-right:20px}
.sale-v2-toolbar .sale-chip-caret{display:inline-flex;align-items:center;justify-content:center;width:20px;min-width:20px;margin-left:auto}

/* Compact checkbox-style status filter in sales toolbar. */
.sale-chip-filter .sale-chip-trigger{padding:10px 20px;gap:18px}
.sale-filter-current{display:inline-flex;align-items:center;gap:10px;color:#403d38;font-weight:650;white-space:nowrap}
.sale-filter-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#a6a19a;flex:none}
.sale-filter-dot.sale-status-success{background:#237543}
.sale-filter-dot.sale-status-danger{background:#b63835}
.sale-filter-dot.sale-status-warning{background:#9e690a}
.sale-chip-filter .sale-chip-options{min-width:238px;padding:6px}
.sale-chip-filter .sale-chip-options button{display:flex;align-items:center;justify-content:flex-start;gap:12px;padding:11px 12px;border-radius:8px;font-size:13px;color:#312f2b;font-weight:600}
.sale-chip-filter .sale-chip-options button[aria-selected=true]{background:#fff5f0}
.sale-filter-checkbox{width:19px;height:19px;display:inline-flex;align-items:center;justify-content:center;flex:none;border:1.5px solid #cfc9c0;border-radius:5px;background:white;color:#fff;font-size:13px;font-weight:800}
.sale-chip-filter .sale-chip-options button[aria-selected=true] .sale-filter-checkbox{background:#ec5536;border-color:#ec5536}
.sale-filter-option-label{flex:1;text-align:left}

/* Status filter: retain approved colored chips, with checkbox selection. */
.sale-chip-filter .sale-chip-trigger{padding:7px 20px}
.sale-chip-filter .sale-chip-options button{gap:10px;justify-content:flex-start;min-height:49px;padding:8px 11px}
.sale-chip-filter .sale-chip-options button>.sale-chip{display:inline-flex;align-items:center;max-width:calc(100% - 32px);white-space:normal;line-height:1.25;font-size:12px;text-align:left}
.sale-chip-filter .sale-chip-options button[aria-selected=true]{background:#fff8f4}

/* One chevron per filter; pseudo-element belongs to the actual click target. */
.sale-v2-toolbar .sale-chip-trigger{position:relative;padding-right:55px;cursor:pointer}
.sale-v2-toolbar .sale-chip-trigger .sale-chip-caret{display:none!important}
.sale-v2-toolbar .sale-chip-trigger::after{content:"";position:absolute;right:20px;top:50%;transform:translateY(-50%);width:20px;height:20px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23645e56' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/20px no-repeat;pointer-events:none}
.sale-v2-toolbar #saleAgency{cursor:pointer;background-position:right 20px center}

/* Closure dates and robust, server-side advanced sales filters. */
.sale-v2-table table{min-width:1110px}
.sale-v2-table th:first-child,.sale-v2-table td:first-child{width:29%}
.sale-v2-table th:nth-child(2),.sale-v2-table td:nth-child(2){width:7%}
.sale-v2-table th:nth-child(3),.sale-v2-table td:nth-child(3){width:12%}
.sale-v2-table th:nth-child(4),.sale-v2-table td:nth-child(4){width:12%}
.sale-v2-table th:nth-child(5),.sale-v2-table td:nth-child(5){width:12%}
.sale-v2-table th:nth-child(6),.sale-v2-table td:nth-child(6){width:12%}
.sale-v2-table th:nth-child(7),.sale-v2-table td:nth-child(7){width:13%}
.sale-v2-table th:nth-child(8),.sale-v2-table td:nth-child(8){width:3%}
.sale-v2-table thead th:nth-child(n+2){text-align:center;vertical-align:middle}
.sale-v2-table tbody td:nth-child(n+2){text-align:center}
.sale-v2-table tbody td:nth-child(7) .sale-mobile-status{margin-inline:auto}
.sale-v2-table .sale-v2-date{color:#655f58;font-size:12px;white-space:nowrap;font-weight:650}
.sale-advanced-actions{display:flex;align-items:center;gap:14px;margin:-8px 0 18px;flex-wrap:wrap}
.sale-filter-toggle{font-size:12px!important;padding:9px 14px!important}
.sale-clear-filters{background:none;border:0;color:#d44e32;font-size:12px;font-weight:700;cursor:pointer}
.sale-advanced-panel{border:1px solid #e8e1d9;border-radius:16px;background:#fffdfa;padding:22px;margin:0 0 20px;box-shadow:0 8px 25px #342a1d08}
.sale-advanced-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.sale-advanced-grid label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#615d58;font-weight:700;min-width:0}
.sale-advanced-grid input,.sale-advanced-grid select{width:100%;min-height:42px;border:1px solid #dedbd5;border-radius:9px;padding:9px 12px;background:white;color:#292724;font:inherit;font-weight:500}
.sale-advanced-grid select{cursor:pointer}
.sale-advanced-footer{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:20px;font-size:12px;color:#8a857d}
@media(max-width:1100px){.sale-advanced-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:750px){.sale-advanced-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.sale-advanced-grid{grid-template-columns:1fr}.sale-advanced-footer{align-items:stretch;flex-direction:column}.sale-advanced-footer .btn{width:100%}}

/* Conditions are embedded in Sales create/edit; no nested payment modals. */
.sale-terms-panel{display:grid;gap:16px;min-width:0}
.sale-terms-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:16px 18px;background:#faf8f4;border:1px solid #f0e8dc;border-radius:14px}
.sale-terms-intro strong{font-size:15px;color:#282522}
.sale-terms-intro p{margin:5px 0 0;font-size:12px;line-height:1.55;color:#857e75;font-weight:500}
.sale-terms-tag{display:inline-flex;align-items:center;white-space:nowrap;border-radius:999px;padding:7px 11px;background:#eff5fc;color:#246299;font-size:11px;font-weight:800}
.sale-form-grid .sale-terms-channel{max-width:260px;font-size:12px}
.sale-terms-list{display:grid;gap:12px}
.sale-term-item{border:1px solid #ebe6dd;border-radius:15px;background:white;overflow:hidden}
.sale-term-top{display:flex;align-items:center;gap:10px;padding:13px 15px;border-bottom:1px solid #f0ede7;background:#fdfcfb}
.sale-term-number{width:30px;height:30px;display:grid;place-items:center;background:#f1eee9;border-radius:8px;font-size:12px;color:#756d65;font-weight:800}
.sale-term-top strong{font-size:13px;color:#292625;flex:1}
.sale-term-amount{font-size:12px;font-weight:800;color:#287047;background:#e9f6ee;padding:6px 10px;border-radius:999px}
.sale-term-delete{border:1px solid #f6ddd8;color:#ca4235;background:#fff4f1;border-radius:8px;width:30px;height:30px;font-weight:700;cursor:pointer}
.sale-term-delete:hover{background:#ffe8e3}
.sale-term-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;padding:15px}
.sale-form-grid .sale-term-fields label{font-size:11px;min-width:0}
.sale-term-days{display:grid;grid-template-columns:minmax(75px,.7fr) minmax(110px,1fr);gap:8px}
.sale-term-date[hidden]{display:none!important}
.sale-term-note{grid-column:1/-1}
.sale-form-grid .sale-term-fields input,.sale-form-grid .sale-term-fields select{width:100%;box-sizing:border-box;font-size:13px;font-weight:600;min-height:44px}
.sale-term-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px}
.sale-term-bottom [data-plan-total]{font-size:12px;font-weight:800;color:#645d56}
.sale-form-grid .sale-terms-notes{font-size:12px}
.sale-terms-notes textarea{width:100%;box-sizing:border-box;resize:vertical}
@media(max-width:650px){.sale-terms-intro{flex-direction:column}.sale-terms-tag{white-space:normal}.sale-term-fields{grid-template-columns:1fr}.sale-term-note{grid-column:auto}.sale-term-bottom{flex-wrap:wrap}}

/* Hitos por porcentaje o importe fijo */
.sale-term-percentage[hidden],.sale-term-fixed[hidden]{display:none!important}
.sale-term-amount{font-variant-numeric:tabular-nums;white-space:nowrap}
.sale-term-fields [data-p="entry_mode"]{background-color:#f9f7f3;border-color:#ddd5ca;font-weight:750}
.sale-term-fixed input{border-color:#cbdde9!important;background:#f7fbff!important;color:#204d70!important;font-variant-numeric:tabular-nums}
.sale-term-top{flex-wrap:wrap}
.sale-term-bottom [data-plan-total]{font-variant-numeric:tabular-nums;text-align:right}
@media(max-width:650px){.sale-term-amount{order:3}.sale-term-delete{margin-left:auto}}

/* Comisión comercial: desglose visible y consistente en Presupuesto/Equipo */
.sale-v2-section .sale-commission-panel{display:grid;grid-column:1/-1;gap:14px;padding:16px;border:1px solid #e8dfd5;border-radius:12px;background:#fcfaf7;min-width:0}
.sale-commission-panel .sale-commission{display:grid;gap:6px;font-size:13px;color:#282522}
.sale-commission-panel .sale-commission>span{display:flex;align-items:center;gap:9px;font-size:13px;font-weight:750}
.sale-commission-panel .sale-commission small{color:#827a72;font-size:11px;line-height:1.5}
.sale-commission-breakdown,.sale-team-commission{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.sale-commission-breakdown>div,.sale-team-commission>div{border:1px solid #e9e2db;border-radius:10px;background:#fff;padding:12px;min-width:0;display:grid;gap:7px}
.sale-commission-breakdown span,.sale-team-commission span{font-size:11px;color:#716c66;font-weight:650;line-height:1.4}
.sale-commission-breakdown span small,.sale-team-commission span small{display:inline-block;color:#ad654c;font-size:11px;font-weight:800;margin-left:3px}
.sale-commission-breakdown strong,.sale-team-commission strong{font-size:16px;font-weight:800;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:#262522}
.sale-commission-breakdown>div:first-child,.sale-team-commission>div:first-child{background:#f0f8f1;border-color:#d8e9db}
.sale-commission-breakdown>div:first-child strong,.sale-team-commission>div:first-child strong{color:#287343}
.sale-v2-section-body>.sale-team-commission{grid-column:1/-1}
.sale-team-commission.is-disabled{opacity:.58}
@media(max-width:550px){.sale-commission-breakdown,.sale-team-commission{grid-template-columns:1fr}.sale-commission-breakdown>div,.sale-team-commission>div{grid-template-columns:1fr auto;align-items:center}.sale-commission-breakdown strong,.sale-team-commission strong{text-align:right}}

/* Responsable y equipo comparten el acordeón de presupuesto. */
.sale-v2-section-body>.sale-budget-team-heading{grid-column:1/-1;display:grid;gap:5px;padding-top:16px;margin-top:4px;border-top:1px solid #eae4dc}
.sale-budget-team-heading strong{font-size:14px;font-weight:800;color:#292522}
.sale-budget-team-heading small{font-size:11px;line-height:1.5;color:#827b73}

/* Ventas: nombres de talento y comercial sin correos en el listado. */
.sale-v2-commercial{display:block;font-size:11px;line-height:1.5;color:#aaa39a}
.sale-v2-talent b,.sale-v2-commercial b{font-weight:700;color:#78736c}

.sale-notice.sale-notice-success{background:#e9f7ee;color:#237543;border:1px solid #c6e8d1;font-weight:650;padding:13px 15px}

.sale-notice{display:flex;align-items:center;justify-content:space-between;gap:12px}
.sale-notice>span{min-width:0}
.sale-notice-dismiss{appearance:none;border:0;background:transparent;color:inherit;opacity:.75;cursor:pointer;font-size:21px;line-height:1;padding:2px 5px;border-radius:6px;flex:none}
.sale-notice-dismiss:hover,.sale-notice-dismiss:focus-visible{opacity:1;background:rgba(35,117,67,.09)}
.sale-notice-dismiss:focus-visible{outline:2px solid currentColor;outline-offset:2px}

/* Prevent editing financial terms while their request is under Finance review. */
.sale-plan-locked{border:1px solid #f0c9b9;background:#fff5ee;border-radius:12px;padding:15px 16px;margin:14px 0;color:#923e2d}
.sale-plan-locked strong{display:block;font-size:13px}
.sale-plan-locked p{font-size:12px;margin:7px 0 10px;line-height:1.5}
.sale-plan-locked .btn{margin:4px 0}
.sale-plan-locked [data-plan-cancel-panel]{margin-top:12px;padding-top:11px;border-top:1px solid #efd5c9}
.sale-plan-locked [data-plan-cancel-panel] textarea{width:100%;border:1px solid #dfc8bc;border-radius:8px;padding:10px;background:#fff;color:#333;display:block;margin:7px 0 10px}
.sale-plan-fields{border:0;margin:0;padding:0;min-width:0}
.sale-plan-fields:disabled{opacity:.62}
.sale-plan-fields[disabled] .sale-term-add,.sale-plan-fields[disabled] .sale-term-delete{cursor:not-allowed}

/* Sales editor: simplified intermediary panel (2026-11-10) */
#saleIntermediaryBlock{background:#fff;border-color:#e6e3de;border-radius:13px;box-shadow:none}
#saleIntermediaryBlock .sale-intermediary-head{padding:15px 18px;min-height:62px}
#saleIntermediaryBlock .sale-intermediary-head-copy strong{font-size:14px;color:#282724}
#saleIntermediaryBlock .sale-intermediary-head-copy small{color:#807a72;font-size:11px}
#saleIntermediaryBlock .sale-intermediary-chevron{width:26px;height:26px;flex-basis:26px;border:none;background:#f5f3f0;font-size:18px;color:#817b74}
#saleIntermediaryBlock .sale-intermediary-body{padding:17px 18px 20px;gap:14px;background:#fff}
#saleIntermediaryBlock .sale-intermediary-toggle{display:flex;align-items:center;gap:9px;font-weight:700;color:#38342f;font-size:13px;cursor:pointer}
#saleIntermediaryBlock .sale-intermediary-toggle input{width:17px;height:17px;accent-color:#ed5432}
#saleIntermediaryControls:not([hidden]){display:grid;gap:14px}
#saleIntermediaryControls>label{max-width:360px;display:grid;gap:7px;font-weight:700;font-size:12px;color:#615c54}
#saleIntermediaryControls>small{max-width:620px;line-height:1.5;color:#867e74}
#saleIntermediaryRows{gap:9px}
#saleIntermediaryRows .sale-intermediary-row{margin:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,.65fr) auto;gap:10px;align-items:center;padding:12px;background:#f9f8f6;border:1px solid #e9e4dd;border-radius:10px}
#saleIntermediaryRows .sale-intermediary-row select,#saleIntermediaryRows .sale-intermediary-row input{min-width:0;width:100%;min-height:43px;background-color:#fff;border:1px solid #dedad4;border-radius:8px;padding:10px 12px;font-size:12px}
#saleIntermediaryRows .sale-intermediary-row select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23706b63' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-position:right 12px center;background-repeat:no-repeat;padding-right:34px}
#saleIntermediaryRows .sale-intermediary-row .btn{min-height:40px;white-space:nowrap}
#saleIntermediaryRows .sale-intermediary-row .sale-cxp-status{white-space:nowrap;font-size:11px}
#saleIntermediaryRows .sale-intermediary-existing{grid-template-columns:minmax(0,1fr) minmax(130px,.55fr) auto auto}
#saleIntermediaryRows:empty:after{content:'Sin proveedores vinculados todavía.';display:block;padding:13px 14px;color:#8b847b;background:#faf9f6;border:1px dashed #e5ded4;border-radius:9px;font-size:12px}
#saleIntermediaryBlock #saleAddIntermediary{justify-self:start;border:1px solid #e2d9cf;background:#fff;color:#3e3934}
#saleIntermediaryBlock #saleInflationPreview{grid-template-columns:1fr auto;max-width:100%;background:#faf9f7;border-color:#eee8df;padding:14px 16px;gap:9px 14px}
#saleIntermediaryBlock #saleInflationPreview strong:last-child{font-weight:800}
@media(max-width:700px){#saleIntermediaryRows .sale-intermediary-row,#saleIntermediaryRows .sale-intermediary-existing{grid-template-columns:1fr}#saleIntermediaryBlock #saleAddIntermediary{width:100%}#saleIntermediaryControls>label{max-width:none}}

/* Financial milestone edit actions: clear separation from last milestone and notes. */
.sale-plan-fields .sale-term-bottom{margin-top:16px;margin-bottom:18px;gap:16px;min-height:48px;flex-wrap:wrap}
.sale-plan-fields .sale-term-bottom .sale-term-add{margin:0;min-height:44px}
.sale-plan-fields .sale-terms-notes{display:grid;gap:8px;margin-top:2px}
