/* V48 — visible email connection and billing actions. */
.cb-mail-connection{display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,.75fr);align-items:center;gap:20px;margin:0 0 18px;padding:20px;border:2px solid #9fc9e8;border-radius:16px;background:#f0f7ff;scroll-margin-top:24px}
.cb-mail-info{min-width:0}.cb-mail-info h3{margin:0 0 8px;font-size:21px;color:#123d63}.cb-mail-sender{margin:0 0 10px;font-size:14px;overflow-wrap:anywhere;line-height:1.5;color:#3c5872}
.cb-mail-status{display:inline-block;margin:0 0 6px;padding:7px 11px;border-radius:8px;background:#dcebf8;color:#163f62;font-size:15px;font-weight:750;line-height:1.4}
.cb-mail-detail,.cb-mail-help{margin:0;font-size:13px;line-height:1.5;color:#3c5872;overflow-wrap:anywhere}
.cb-mail-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0}.cb-mail-actions>.button{width:100%;min-height:52px;white-space:normal;line-height:1.35;padding:13px 18px;font-size:16px}.cb-mail-help{text-align:center}.cb-mail-google{font-size:14px;text-align:center;color:#075b9b;padding:7px;overflow-wrap:anywhere}
.cb-mail-connection[data-state=connected]{border-color:#9acdb9;background:#f2faf6}.cb-mail-connection[data-state=connected] .cb-mail-status{background:#d7eee2;color:#175437}.cb-mail-connection[data-state=setup] .cb-mail-status{background:#fff0cb;color:#715000}.cb-mail-connection[data-state=error] .cb-mail-status{background:#ffe7e3;color:#922f25}
.cb-main-actions{margin:0 0 22px;padding:0;gap:12px}.cb-main-actions>.button{min-height:54px;line-height:1.35;font-size:16px}.cb-send-closure{scroll-margin-top:24px}.cb-mail-connection [hidden]{display:none!important}
@media(max-width:760px){.cb-mail-connection{grid-template-columns:minmax(0,1fr);gap:14px;padding:16px;margin-bottom:14px}.cb-mail-info h3{font-size:19px}.cb-mail-actions>.button{min-height:52px}.cb-main-actions{margin-bottom:18px}.cb-main-actions>.button{flex:1 1 100%;min-width:0!important;width:100%}.cb-send-closure{padding:16px}}
/* Service and region summaries. */
.cb-summary{width:100%;max-width:100%;min-width:0;margin:16px 0}
.cb-summary-table{width:100%;min-width:0;border-collapse:collapse;table-layout:fixed;font-size:14px;line-height:1.3;color:#153452}
.cb-summary-table th,.cb-summary-table td{padding:9px 5px;border-bottom:1px solid #d5e3ef;text-align:center;vertical-align:middle;white-space:normal;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.cb-summary-table thead th{background:#eaf3fb;font-size:12px;font-weight:750;white-space:pre-line}
.cb-summary-table tr>th:first-child{width:19%;text-align:left;font-weight:650}
.cb-summary-table tbody>tr>th:first-child{font-size:13px}
.cb-summary-table tfoot{background:#eaf3fb;font-weight:800}
.cb-summary-table .cb-summary-error{text-align:left;color:#963e2c}
.cb-summary-table td::before{display:none}
.cb-region-total,.cb-final-total{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:14px 16px;border-radius:12px;margin-top:18px;background:#eaf3fb;font-size:15px;font-weight:650}
.cb-final-total{background:#0a588f;color:#fff;margin-top:26px}
.cb-final-amount{font-size:24px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.cb-region-total .cb-region-amount{font-size:22px;white-space:normal;overflow-wrap:anywhere}
@media(max-width:1100px){
 .cb-summary-table,.cb-summary-table tbody,.cb-summary-table tfoot{display:block;width:100%}
 .cb-summary-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .cb-summary-table tbody{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:12px}
 .cb-summary-table tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid #cbddeb;border-radius:12px;overflow:hidden;background:#fff;margin:0;min-width:0}
 .cb-summary-table tr>th:first-child{grid-column:1/-1;width:auto;max-width:100%;background:#eaf3fb;padding:10px;font-size:14px;text-align:left}
 .cb-summary-table td{min-width:0;padding:8px 4px;font-size:17px;font-weight:650;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:4px;line-height:1.2;border-right:1px solid #e4edf5;border-bottom:1px solid #e4edf5}
 .cb-summary-table td::before{display:block;content:attr(data-label);font-size:11px;line-height:1.25;font-weight:500;white-space:pre-line;max-width:100%;overflow-wrap:anywhere}
 .cb-summary-table tfoot{margin-top:12px;background:none}
 .cb-summary-table tfoot tr{background:#f1f7fc}
 .cb-summary-table tfoot td{font-weight:800}
 .cb-summary-table .cb-summary-error{grid-column:1/-1;align-items:start;font-size:13px;padding:12px}
 .cb-summary-table .cb-summary-error::before{display:none}
 .cb-billing-panel>.cb-step-tabs{min-width:0}
 .cb-billing-panel .cb-step-tabs>button{min-width:min(200px,100%)}
}
@media(max-width:480px){
 .cb-billing-panel{padding:10px}
 .cb-billing-panel .cb-step-tabs{flex-direction:column}
 .cb-billing-panel .cb-step-tabs>button{min-width:0;width:100%}
 .cb-summary-table td{padding:7px 3px}
 .cb-region-total,.cb-final-total{padding:12px;font-size:14px}
}

.cb-amount-overview{margin:22px 0}.cb-amount-overview h3{margin-bottom:8px}.cb-amount-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px;margin-top:16px}.cb-amount-card{display:grid;grid-template-columns:40px minmax(0,1fr);gap:8px 12px;align-content:start;text-align:left;min-width:0;width:100%;padding:18px;border:1px solid #bcd8ed;border-radius:16px;background:#eef7ff;color:#173b57}.cb-amount-card:hover:not(:disabled){background:#dcefff;border-color:#0879b7}.cb-amount-icon{font-size:30px;grid-row:1}.cb-amount-name{font-weight:700;overflow-wrap:anywhere}.cb-amount-value{grid-column:1/-1;display:block;font-size:clamp(22px,2.2vw,30px);font-variant-numeric:tabular-nums;white-space:nowrap;overflow-wrap:normal;word-break:normal}.cb-amount-card small{grid-column:1/-1;color:#496b85}.cb-amount-card:focus-visible{outline:3px solid #0879b7;outline-offset:3px}.cb-amount-card:disabled{opacity:1;background:#f5f5f5;color:#667788}

.cb-table tr[data-review-state=confirmed]>td:first-child{border-left:5px solid #16803d}.cb-table tr[data-review-state=pending]>td:first-child{border-left:5px solid #c66b08}.cb-table tr[data-review-state=alert]>td:first-child{border-left:5px solid #c12727}.cb-table tr[data-review-state=confirmed] .cb-review{background:#dcfce7;color:#14532d}.cb-table tr[data-review-state=pending] .cb-review{background:#ffedd5;color:#9a3412}.cb-table tr[data-review-state=alert] .cb-review{background:#fee2e2;color:#991b1b}

/* V6: four explicit actions and full-row review states. */
.cb-table tr[data-review-state=confirmed]>td{background:#ecfdf3;color:#14532d}.cb-table tr[data-review-state=pending]>td{background:#fff7ed;color:#7c2d12}.cb-table tr[data-review-state=alert]>td{background:#fef2f2;color:#991b1b}.cb-quick-actions{display:grid;grid-template-columns:repeat(2,minmax(110px,1fr));gap:6px;margin-top:8px}.cb-quick-actions>.button,.cb-confirm-control{min-height:40px;padding:8px;font-size:13px;white-space:normal;line-height:1.2;box-sizing:border-box}.cb-confirm-control{display:flex;align-items:center;gap:7px;background:#fff;border:1px solid #15803d;border-radius:8px;color:#14532d;font-weight:700;cursor:pointer}.cb-confirm-control input{width:19px;height:19px;accent-color:#15803d;margin:0;flex:none}.cb-confirm-control:has(input:disabled){opacity:.65;cursor:not-allowed}.cb-table tr[data-review-state=alert] .cb-alert-control{background:#b91c1c;color:white;border-color:#b91c1c}.cb-alert-text{white-space:normal;font-size:13px;color:#991b1b}.cb-save-status{display:block;white-space:normal;margin-top:5px}.cb-alert-text[hidden]{display:none!important}

.cb-save-status[data-save-state=saved]{color:#166534;font-weight:700}.cb-save-status[data-save-state=error]{color:#b91c1c;font-weight:700}.cb-save-status[data-save-state=saving],.cb-save-status[data-save-state=warning]{color:#92400e;font-weight:700}.cb-editor-save-status{font-weight:700}

/* Revisión por orden: el pie de acciones ocupa todo el ancho del detalle. */
.cb-region .cb-orders-wrap {min-width:0;max-width:100%}
.cb-region .cb-orders {min-width:0;width:100%}
.cb-orders .cb-equipment-bill {border-left:3px solid #0c7392;padding-left:.65rem;font-weight:650}
.cb-orders .cb-equipment-bill small {color:#214b60;font-weight:650}
.cb-orders .cb-order-actions>td {padding:6px 12px 12px;border-bottom:2px solid #bfced8}
.cb-orders tr[data-review-state]:not(.cb-order-actions)>td {border-bottom:0}
.cb-orders .cb-order-actions .cb-quick-actions {display:flex;gap:8px;flex-wrap:wrap;margin:0}
.cb-orders .cb-quick-actions>.button,.cb-orders .cb-confirm-control,.cb-orders .cb-pick-control {
 display:inline-flex;align-items:center;justify-content:center;gap:7px;width:auto;min-width:0;min-height:44px;
 margin:0;padding:8px 14px;text-align:center;box-sizing:border-box;white-space:normal
}
.cb-pick-control {border:1px solid #91a6b8;border-radius:8px;background:#fff;color:#163f62;cursor:pointer}
.cb-orders .cb-pick-control input {width:18px;height:18px;margin:0;flex:none}
.cb-bulk-controls {display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;align-items:center}
.cb-bulk-controls .button {white-space:normal;min-height:44px}
.cb-bulk-controls p {flex-basis:100%;margin:0}
.cb-order-actions .cb-save-status:empty,.cb-bulk-controls p:empty {display:none}
.cb-billing-panel [hidden] {display:none!important}
@media(max-width:800px) {
 .cb-region .cb-orders-wrap {overflow:visible}
 .cb-orders,.cb-orders tbody {display:block;width:100%;min-width:0}
 .cb-orders thead {position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
 .cb-orders tr[data-review-state]:not(.cb-order-actions) {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid #c8d9e5;border-radius:12px 12px 0 0;overflow:hidden;margin-top:14px}
 .cb-orders tr[data-review-state]:not(.cb-order-actions)>td {display:block;width:auto;min-width:0;margin:0;padding:8px 10px}
 .cb-orders tr[data-review-state]:not(.cb-order-actions)>td::before {display:block;content:attr(data-label);font-size:11px;line-height:1.4;color:#405970;font-weight:650}
 .cb-orders tr[data-review-state]>td.cb-services,.cb-orders tr[data-review-state]>td:last-child {grid-column:1/-1}
 .cb-orders tr.cb-order-actions,.cb-orders .cb-edit-row:not([hidden]) {display:block}
 .cb-orders .cb-order-actions>td,.cb-orders .cb-edit-row>td {display:block;width:auto;min-width:0;padding:10px;box-sizing:border-box}
 .cb-orders .cb-order-actions>td {border:1px solid #c8d9e5;border-radius:0 0 12px 12px}
 .cb-orders .cb-order-actions .cb-quick-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .cb-orders .cb-quick-actions>.button,.cb-orders .cb-confirm-control,.cb-orders .cb-pick-control {width:100%;padding:8px 4px}
 .cb-orders .cb-fields {grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}
 .cb-orders input:not([type=checkbox]),.cb-orders select {max-width:100%;box-sizing:border-box}
 .cb-bulk-controls .button {flex:1 1 140px;min-width:0}
}

.cb-orders .cb-order-observation {display:grid;gap:4px;max-width:100%;padding:12px 0;margin:0;line-height:1.45;white-space:normal;overflow-wrap:anywhere}
.cb-orders .cb-order-observation span {white-space:pre-line}
.cb-orders .cb-footer-state {display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;margin:2px 0 10px}
.cb-orders .cb-footer-state .cb-review {display:inline-block;padding:4px 10px;border-radius:8px;margin:0}

.cb-manual-panel,.cb-order-filters {
 box-sizing:border-box;min-width:0;margin:0 0 18px;padding:18px 20px;border-radius:14px
}
.cb-manual-panel {border:2px solid #176884;border-left-width:7px;background:#edf8fc;color:#103e53}
.cb-manual-panel h3,.cb-send-closure h3 {margin:0 0 12px;font-size:clamp(19px,2vw,24px)}
.cb-manual-controls {display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px 16px}
.cb-manual-controls .sp-field {min-width:0;margin:0;font-weight:700}
.cb-manual-controls input {max-width:100%;min-height:44px;box-sizing:border-box}
.cb-manual-help {margin:10px 0 0;font-size:14px;line-height:1.4}
.cb-billing-panel .cb-prepare-send {min-height:48px;background:#09536e;color:white;border:2px solid #09536e;font-size:16px;white-space:normal}
.cb-billing-panel .cb-prepare-send:hover:not(:disabled) {background:#073d51}
.cb-billing-panel .cb-prepare-send:disabled {background:#dde5e9;color:#475864;border-color:#ccd6db;opacity:1}
.cb-mail-period {font-weight:700;overflow-wrap:anywhere}
.cb-mail-regions {padding-left:20px;margin:10px 0;line-height:1.55}
.cb-send-closure .cb-mail-buttons {margin:12px 0;gap:8px;flex-wrap:wrap}
.cb-order-filters {border:2px solid #3574a0;background:#f0f7fd}
.cb-order-filters legend {padding:0 8px;color:#164766;font-size:19px;font-weight:750}
.cb-filter-options {display:flex;flex-wrap:wrap;gap:8px}
.cb-filter-button {display:inline-flex;align-items:center;justify-content:space-between;gap:10px;min-height:46px;border:1px solid #6991af;border-radius:9px;background:white;color:#174462;padding:8px 12px;font:inherit;font-weight:650;line-height:1.3;text-align:left;cursor:pointer}
.cb-filter-count {padding:2px 7px;border-radius:6px;color:#184564;background:#e2edf5;font-size:.84em;font-variant-numeric:tabular-nums}
.cb-filter-button[aria-pressed=true] {background:#114d77;color:white;border-color:#114d77;box-shadow:inset 0 -3px #082e49}
.cb-filter-button[aria-pressed=true] .cb-filter-count {background:white;color:#114d77}
.cb-filter-button:hover:not([aria-pressed=true]):not(:disabled) {background:#deedf8}
.cb-filter-button:focus-visible,.cb-manual-panel button:focus-visible,.cb-mail-buttons button:focus-visible {outline:3px solid #9b5700;outline-offset:3px}
@media(max-width:640px){
 .cb-manual-panel,.cb-order-filters {padding:14px 12px}
 .cb-manual-controls>* {width:100%}
 .cb-filter-options {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,135px),1fr))}
 .cb-filter-button {min-width:0;padding:8px}
 .cb-mail-buttons>.button {width:100%;white-space:normal}
}
.cb-send-closure [data-delivery=enviado] {background:#daf2e3;color:#174e30;border-left:4px solid #24814f;padding:12px;font-weight:700}

.cb-final-attachment {margin:16px 0;padding:14px 16px;background:#edf7f1;border:1px solid #83b29a;border-radius:12px;color:#183e2d}
.cb-final-attachment h4 {margin:0 0 7px;font-size:17px}
.cb-final-attachment strong {display:block;overflow-wrap:anywhere}
.cb-final-attachment p {margin:5px 0}
.cb-final-attachment .button {margin-top:6px;min-height:44px}
