/* Primera integración del marco aprobado. Los módulos conservan sus controles. */
body.integrated-shell{display:block;background:#f6f6f2;color:#171b13;font-family:Avenir,'Avenir Next',Poppins,Arial,sans-serif;--shell-width:222px}
.integrated-shell #app-sidebar{position:fixed;inset:0 auto 0 0;width:var(--shell-width);background:#fff;color:#73796b;border-right:1px solid #e4e5df;display:flex;flex-direction:column;z-index:30;min-height:0;padding:0 15px}
.integrated-shell .shell-brand{height:132px;flex-shrink:0;display:flex;justify-content:center;align-items:center;border-bottom:1px solid #e4e5df;margin-bottom:20px}
.integrated-shell .shell-brand img{width:161px;height:125px;object-fit:contain;padding:0;border:0;background:white}
.integrated-shell .shell-login-note p,.integrated-shell .shell-login-note strong,.integrated-shell .shell-login-note small{margin:14px 10px;color:#868d7b;font-size:10px}
.shell-authenticated .shell-login-note{display:none}
.integrated-shell #app-navigation{display:flex;flex-direction:column;gap:3px;overflow:auto;flex:1;min-height:0;padding-bottom:18px}
.integrated-shell .shell-nav-button{display:flex;gap:11px;align-items:center;padding:11px 12px;border:0;border-radius:7px;background:transparent;color:#747c68;font-size:12px;font-weight:600;text-align:left;min-height:42px;flex-shrink:0}
.integrated-shell .shell-nav-button svg{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.integrated-shell .shell-nav-button:hover{background:#f1f3e9;color:#000}
.integrated-shell .shell-nav-button.shell-current{background:#000;color:white;box-shadow:inset 3px 0 #F4C709}
.integrated-shell .shell-nav-button.shell-current svg{color:#F4C709}
.shell-nav-divider{border-top:1px solid #e4e5df;margin:12px 10px;flex-shrink:0}
.shell-sidebar-foot{font-size:9px;color:#909a81;padding:18px 7px;border-top:1px solid #e4e5df;flex-shrink:0}
.integrated-shell .shell-main{margin-left:var(--shell-width);max-width:none;padding:0 34px 45px}
.integrated-shell .shell-topbar{min-height:83px;background:#fff;border-bottom:1px solid #e4e5df;margin:0 -34px 28px;padding:13px 34px;display:flex;gap:20px;align-items:center;justify-content:space-between;letter-spacing:0;flex-wrap:nowrap}
.shell-breadcrumb{display:flex;gap:14px;align-items:center;font-size:11px;color:#8d9580;white-space:nowrap}
.shell-breadcrumb strong{font-weight:600;color:#424c35}
.shell-header-tools{display:flex;align-items:center;gap:15px;min-width:0}
.integrated-shell .shell-agency{font-size:8px;letter-spacing:1px;color:#929c83;border-left:1px solid #e4e5df;padding-left:18px;margin:0;min-width:145px}
.integrated-shell #app-agency-select{padding:2px 20px 2px 0;margin:3px 0 0;font-size:12px;font-weight:700;border:0;border-radius:0;min-width:120px;color:#26321a}
.integrated-shell #network{font-size:9px;letter-spacing:0;border-radius:5px;background:#f1f4e9;white-space:nowrap}
.shell-profile{border-left:1px solid #e4e5df;padding-left:17px;max-width:250px}
.integrated-shell #welcome{font-size:11px;line-height:1.4;margin:0;overflow-wrap:anywhere}
.integrated-shell #profile{font-size:9px;color:#8d987e;margin:4px 0 0}
.integrated-shell #logout{font-size:10px;padding:9px 12px;white-space:nowrap;border-radius:7px}
.integrated-shell #approvals-button{font-size:10px;padding:9px 12px;border-radius:7px;white-space:nowrap}
.integrated-shell #approvals-count{font-size:10px;padding:1px 6px;margin-left:3px;background:#F4C709;color:#000}
.integrated-shell #app-menu-toggle{display:none}
.integrated-shell .panel{border-color:#e4e5df;border-radius:12px;padding:24px}
.integrated-shell .shell-agency-options{background:#fff;border:1px solid #e4e5df;border-radius:10px;padding:16px 20px;margin:0 0 22px}
.shell-agency-options>summary{font-size:11px;font-weight:600;color:#778369;cursor:pointer}
.shell-agency-options>h2{font-size:15px;margin-top:20px}
.integrated-shell #monthly-summary{margin:0 0 22px;border-radius:12px}
.integrated-shell #monthly-agencies{gap:18px}
.integrated-shell .monthly-agency{border-radius:9px;border-color:#e4e8dd;padding:20px}
.integrated-shell .monthly-values strong{font-size:23px;letter-spacing:-.6px}
.integrated-shell .monthly-consolidated .monthly-values strong{font-size:15px}
.integrated-shell .monthly-consolidated{padding:13px 18px}
.integrated-shell #operation-panel{margin-top:18px}
.integrated-shell #agency-title{font-size:18px}
@media(max-width:1200px){body.integrated-shell{--shell-width:195px}.integrated-shell .shell-main{padding:0 24px 35px}.integrated-shell .shell-topbar{margin:0 -24px 24px;padding:13px 24px}.shell-profile{max-width:180px}.integrated-shell #profile{display:none}.shell-header-tools{gap:10px}.shell-breadcrumb>span{display:none}}
@media(max-width:900px){.shell-breadcrumb{display:none}.shell-header-tools{width:100%;justify-content:space-between;gap:8px}.integrated-shell .shell-agency{min-width:120px;padding:0;border:0}.shell-profile{display:none}.integrated-shell .shell-main{padding:0 20px 35px}.integrated-shell .shell-topbar{margin:0 -20px 24px;padding:13px 20px}.integrated-shell #network{font-size:8px}.integrated-shell #approvals-button{white-space:normal;font-size:9px}}
@media(max-width:650px){body.integrated-shell{--shell-width:0px}.integrated-shell #app-sidebar{display:flex;width:222px;transform:translateX(-100%);box-shadow:15px 0 50px #0002}.integrated-shell #app-sidebar.shell-menu-open{transform:none}.integrated-shell #app-menu-toggle{display:block;font-size:16px;padding:7px 10px;background:white;min-height:38px}.integrated-shell .shell-main{padding:0 15px 30px}.integrated-shell .shell-topbar{padding:12px 15px;margin:0 -15px 20px;gap:10px}.integrated-shell .shell-agency{min-width:95px}.integrated-shell #app-agency-select{font-size:11px;min-width:95px}.integrated-shell #network{max-width:75px;white-space:normal;text-align:center;padding:5px;line-height:1.4}.integrated-shell #logout{font-size:9px;padding:7px;white-space:normal;min-width:0}.integrated-shell #approvals-button{max-width:65px;padding:5px;line-height:1.4;min-width:0}.integrated-shell #approvals-count{display:inline}.integrated-shell .panel{padding:18px}.integrated-shell .monthly-values strong{font-size:20px}.integrated-shell .monthly-consolidated .monthly-values strong{font-size:13px}}
/* Compra y retroventa inicial: mismos pasos, controles y cálculos. */
.integrated-shell #purchase-workspace{padding:28px;max-width:1180px;margin-inline:auto}
.integrated-shell #purchase-workspace>.row{align-items:center;gap:16px;padding-bottom:23px;border-bottom:1px solid #e4e5df;flex-wrap:wrap}
.integrated-shell #purchase-reference{font-size:24px;line-height:1.3;letter-spacing:-.6px;margin:7px 0}
.integrated-shell #purchase-tabs{border:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:25px 0 12px;counter-reset:stage}
.integrated-shell #purchase-tabs button{counter-increment:stage;display:flex;align-items:center;gap:10px;text-align:left;padding:15px 12px;background:#f5f6f1;border:1px solid #e5e7de;border-radius:9px;color:#747d68;font-size:12px;min-width:0;line-height:1.4}
.integrated-shell #purchase-tabs button::before{content:counter(stage);display:grid;place-items:center;width:27px;height:27px;flex-shrink:0;border:1px solid #d8dece;border-radius:50%;font-size:11px;background:#fff}
.integrated-shell #purchase-tabs button.completed::before{content:'✓';background:#e3efd9;border-color:#b8d4a5;color:#386123}
.integrated-shell #purchase-tabs button.current{background:#000;color:#fff;border-color:#000;box-shadow:none}
.integrated-shell #purchase-tabs button.current::before{background:#F4C709;border-color:#F4C709;color:#000}
.integrated-shell #purchase-tabs button:disabled{opacity:.55}
.integrated-shell #purchase-step-count{font-size:11px;color:#758167;margin:0 0 22px}
.integrated-shell #purchase-operation-context{padding:15px 18px;background:#fffbed;border-left:3px solid #F4C709;border-radius:5px;line-height:1.7;font-size:12px}
.integrated-shell .purchase-form-block{border:1px solid #e2e6da;border-radius:10px;padding:23px;margin:24px 0;background:#fff}
.integrated-shell .purchase-form-block>h3{font-size:15px;letter-spacing:-.2px;margin:0 0 23px;padding-bottom:16px;border-bottom:1px solid #e9ece2}
.integrated-shell #purchase-form label,.integrated-shell #payment-panel label,.integrated-shell #purchase-closing-window label{font-size:12px;line-height:1.6;color:#455138;font-weight:600}
.integrated-shell #purchase-form input,.integrated-shell #purchase-form select,.integrated-shell #payment-panel select,.integrated-shell #payment-panel input:not([type=checkbox]),.integrated-shell #payment-sri{background:#fbfcf8;border:1px solid #dfe4d5;border-radius:7px;font-size:13px;padding:12px;font-weight:500;color:#1c2416;max-width:100%}
.integrated-shell #purchase-lines .purchase-line{padding:20px;background:#f8faf5;border:1px solid #e2e7da;border-radius:8px;margin:16px 0}
.integrated-shell .purchase-line .line-top{font-size:12px;margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid #e2e7da}
.integrated-shell .purchase-line .line-result{background:#edf3e5;border:1px solid #dce6d0;border-radius:7px;padding:15px;font-size:12px}
.integrated-shell .purchase-line .line-result b{font-size:22px;letter-spacing:-.5px}
.integrated-shell #add-piece,.integrated-shell #new-client-open{font-size:11px;border-radius:7px;background:#fff;padding:11px 15px}
.integrated-shell .purchase-summary{border-radius:10px;padding:25px 28px;margin:25px 0;background:#000;gap:25px}
.integrated-shell .purchase-summary strong{font-size:36px;letter-spacing:-1px;color:#F4C709}
.integrated-shell .purchase-summary p{font-size:12px;line-height:1.8;max-width:460px;color:#d7ddce}
.integrated-shell #purchase-document-refs{background:#f9fbf5;border:1px solid #e2e8d8;border-radius:10px;padding:25px;gap:24px;font-size:12px}
.integrated-shell #purchase-documents-open,.integrated-shell #save-purchase,.integrated-shell #register-transfer,.integrated-shell #cash-delivered,.integrated-shell #close-purchase,.integrated-shell #purchase-documents-next{border-radius:7px;padding:14px 21px;font-size:12px}
.integrated-shell #payment-panel{padding:24px;border:1px solid #e1e6d8;border-radius:10px;background:#fff;margin:0}
.integrated-shell #payment-panel h2,.integrated-shell #purchase-closing-window h2{font-size:20px;letter-spacing:-.4px}
.integrated-shell #payment-amount{font-size:30px;letter-spacing:-.8px;display:inline-block;margin:15px 0}
.integrated-shell #payment-whatsapp{padding:12px 16px;background:#1b7548;color:#fff;border-radius:7px;font-size:12px;text-decoration:none}
.integrated-shell #copy-transfer-text{font-size:12px;padding:12px 16px;border-radius:7px}
.integrated-shell #transfer-copy-status{font-size:12px;color:#685821;flex-basis:100%}
.integrated-shell #payment-detail{padding:18px;border-radius:8px;background:#f7f9f3;font-size:12px;line-height:1.7}
.integrated-shell .purchase-close-summary{padding:22px;background:#f5f8ef;border:1px solid #dfe7d3;border-radius:9px;font-size:14px;line-height:1.8}
.integrated-shell [data-purchase-window]>.preparation-navigation{display:flex;justify-content:space-between;border-top:1px solid #e4e8db;padding-top:20px;margin-top:28px}
.integrated-shell [data-purchase-window]>.preparation-navigation button{font-size:12px;border-radius:7px}
@media(max-width:650px){.integrated-shell #purchase-workspace{padding:17px}.integrated-shell #purchase-reference{font-size:19px}.integrated-shell #purchase-tabs{gap:5px}.integrated-shell #purchase-tabs button{flex-direction:column;align-items:flex-start;font-size:10px;padding:11px 6px;gap:7px}.integrated-shell .purchase-form-block{padding:15px;margin:19px 0}.integrated-shell #purchase-lines .purchase-line{padding:14px}.integrated-shell .purchase-summary{padding:20px;flex-direction:column;align-items:flex-start;gap:12px}.integrated-shell .purchase-summary strong{font-size:30px}.integrated-shell #payment-panel{padding:16px}.integrated-shell #purchase-document-refs{padding:18px}.integrated-shell #payment-amount{font-size:26px}}

/* Agencias es una consulta independiente; conserva los formularios montados. */
.shell-agencies-view #purchase-section,.shell-agencies-view #retro-panel,.shell-agencies-view #customers-panel,.shell-agencies-view #inventory-panel,.shell-agencies-view #classification-panel,.shell-agencies-view #finance-panel,.shell-agencies-view #operation-register-panel,.shell-agencies-view #separation-panel{display:none!important}
/* Tasación rápida conectada: composición de la pantalla revisada. */
.shell-quick-view #purchase-section,.shell-quick-view #retro-panel,.shell-quick-view #customers-panel,.shell-quick-view #inventory-panel,.shell-quick-view #classification-panel,.shell-quick-view #finance-panel,.shell-quick-view #operation-register-panel,.shell-quick-view #separation-panel,.shell-quick-view #monthly-summary,.shell-quick-view #app-agency-options{display:none!important}
.integrated-shell #quick-dialog.quick-screen{position:static;inset:auto;width:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;box-shadow:none;color:inherit;box-sizing:border-box;overflow:visible}
.integrated-shell #quick-dialog.quick-screen:not([open]){display:none}
.quick-screen .quick-eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:700;color:#859174;margin:5px 0 13px}
.quick-screen .expected-document-toolbar{background:transparent;padding:0;margin:0 0 15px;border:0}
.quick-screen #quick-title{font-size:31px;letter-spacing:-1px;margin:0}
.quick-screen>p:not(.quick-eyebrow){font-size:13px;color:#7e8a6c;line-height:1.7;margin:0 0 28px}
.quick-screen #quick-close{font-size:11px;padding:10px 14px;border-radius:7px;background:#fff}
.quick-operation-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:22px;align-items:start;margin-top:25px}
.quick-fields-surface{padding:27px;border:1px solid #e2e6da;background:#fff;border-radius:12px;min-width:0}
.quick-screen label{font-size:11px;color:#788669;font-weight:600;line-height:1.7}
.quick-screen input,.quick-screen select{background:#fbfcf8;border:1px solid #dde4d4;border-radius:7px;padding:13px;font-size:13px;min-width:0;color:#222b19;max-width:100%;box-sizing:border-box}
.quick-screen .quick-line{background:transparent;border:0;border-top:1px solid #e5e9de;border-radius:0;padding:24px 0 15px;margin:22px 0 0}
.quick-screen .piece-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.quick-screen .piece-grid>label{grid-column:auto}
.quick-screen .line-result{font-size:12px;padding:15px;background:#f5f8ef;border:1px solid #e0e7d7;border-radius:7px;line-height:1.8}
.quick-screen .quick-line>button,.quick-screen #quick-add{font-size:11px;border-radius:7px;padding:11px 15px;margin-top:16px;background:#fff}
.quick-screen #quick-parameters{font-size:10px;line-height:1.8;color:#89957a;margin-top:22px;overflow-wrap:anywhere}
.integrated-shell .quick-amount-summary{position:sticky;top:20px;padding:27px;background:#000;color:#fff;min-height:0;border-radius:12px;border-top:4px solid #F4C709;width:auto}
.quick-amount-summary .stats{display:block;padding:0;background:transparent;border:0;margin:0}
.quick-amount-summary .stats>span{display:block;font-size:10px;color:#acb79e;letter-spacing:.3px}
.quick-amount-summary #quick-total{display:block;font-size:35px;letter-spacing:-1px;color:#F4C709;margin:14px 0 26px}
.quick-amount-summary #quick-net{display:block;font-size:14px;margin-top:12px;color:#fff}
.quick-amount-summary #quick-error{font-size:11px;line-height:1.7;color:#ffe191;margin:18px 0}
.quick-amount-summary #quick-continue{font-size:11px;padding:14px 10px;width:100%;border-radius:7px;margin-top:15px}
@media(max-width:950px){.quick-operation-layout{grid-template-columns:minmax(0,1fr)}.integrated-shell .quick-amount-summary{position:static}}
@media(max-width:650px){.quick-screen #quick-title{font-size:27px}.quick-fields-surface{padding:20px}.quick-screen .piece-grid{gap:14px}.quick-screen input,.quick-screen select{font-size:12px;padding:11px}.quick-operation-layout{gap:18px}.integrated-shell .quick-amount-summary{padding:23px}}
.shell-quick-view #agency-view,.shell-quick-view #users-view{display:none!important}
.quick-screen .piece-grid>.line-result{grid-column:auto}
/* Alta compartida desde tasación/compra: apariencia común, mismos campos. */
.integrated-shell #new-customer-dialog{width:min(780px,94vw);border:1px solid #e2e7d9;border-radius:13px;padding:28px;box-sizing:border-box;max-height:90vh;overflow:auto;background:#fff}
.integrated-shell #new-customer-dialog .expected-document-toolbar{padding:0 0 18px;margin-bottom:23px;border-bottom:1px solid #e4e8dc;background:transparent}
.integrated-shell #new-client-heading{font-size:25px;letter-spacing:-.7px}
.integrated-shell #new-client-form label{font-size:12px;color:#566248;font-weight:600;line-height:1.7}
.integrated-shell #new-client-form input:not([type=checkbox]),.integrated-shell #new-client-form select{background:#fbfcf8;border:1px solid #dfe5d5;border-radius:7px;padding:12px;font-size:13px;min-width:0;box-sizing:border-box}
.integrated-shell #new-client-bank-fields{background:#f7faf2;border:1px solid #e0e8d4;border-radius:9px;padding:20px;margin:18px 0}
.integrated-shell #new-client-save{border-radius:7px;font-size:12px;padding:14px 18px;margin-top:20px}
@media(max-width:650px){.integrated-shell #new-customer-dialog{padding:20px}.integrated-shell #new-client-form .form-grid{grid-template-columns:minmax(0,1fr)}.integrated-shell #new-client-bank-fields{padding:14px}}
/* Documentos: referencias y formatos en la composición revisada. */
.integrated-shell #purchase-document-refs{display:block;padding:27px;border:1px solid #e3e7dd;border-radius:11px;background:white}
.integrated-shell #purchase-document-refs>h2{font-size:23px;letter-spacing:-.5px;margin:0 0 12px}
.integrated-shell #purchase-document-refs>p{font-size:12px;color:#7c896d;line-height:1.8}
.document-reference-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:23px;background:#f7f9f2;border:1px solid #e1e7d8;padding:23px;border-radius:9px;margin:23px 0}
.document-reference-grid>span{font-size:10px;color:#879476;min-width:0}
.document-reference-grid strong{display:block;margin-top:9px;font-size:13px;color:#28321e;overflow-wrap:anywhere}
.document-format-row{display:flex;gap:15px;align-items:center;border-bottom:1px solid #e5e9df;padding:22px 0}
.document-format-row>span{font-size:24px;color:#6d7b5d}
.document-format-row strong{font-size:13px;display:block}
.document-format-row small{font-size:11px;color:#879476;display:block;margin-top:7px;line-height:1.7}
.integrated-shell #purchase-documents-open{margin-top:23px;background:#F4C709;color:#000;border-color:#F4C709}
@media(max-width:650px){.integrated-shell #purchase-document-refs{padding:19px}.document-reference-grid{padding:17px;gap:20px;grid-template-columns:minmax(0,1fr)}.document-format-row{gap:12px}}
/* Pago: cuenta, requerimiento y comprobante separados. */
.payment-form-block{border:1px solid #e0e7d7;border-radius:10px;padding:22px;margin:24px 0;background:#fff}
.payment-form-block h3{font-size:15px;margin:0 0 18px;letter-spacing:-.2px}
.integrated-shell #payment-panel>p:has(#payment-amount){background:#000;border-top:3px solid #F4C709;border-radius:10px;color:#ccd6be;padding:20px 24px;font-size:11px}
.integrated-shell #payment-panel #payment-amount{display:block;color:#F4C709;margin:10px 0 0;font-size:34px}
.integrated-shell #payment-request-block{background:#f4f8ee;border-color:#dce7d0}
.integrated-shell #payment-request-block p{font-size:12px;line-height:1.8;color:#7a8968;margin-bottom:20px}
.integrated-shell #payment-request-block #payment-whatsapp{display:inline-block;margin:0 10px 10px 0}
.integrated-shell #payment-request-block #copy-transfer-text{display:inline-block;margin:0 0 10px}
.integrated-shell #payment-request-block #transfer-copy-status{display:block;line-height:1.7;margin-top:10px}
.integrated-shell #payment-account-actions{margin-top:16px;gap:10px}
.integrated-shell #payment-account-actions button{font-size:11px;padding:11px 14px;border-radius:7px}
.integrated-shell #payment-check-label{padding:18px;background:#f7f9f3;border:1px solid #e2e8d9;border-radius:8px;font-size:12px;line-height:1.8;margin:23px 0}
.integrated-shell #bank-edit-dialog{width:min(620px,94vw);border:1px solid #dfe5d5;border-radius:12px;padding:26px;box-sizing:border-box;max-height:90vh;overflow:auto}
.integrated-shell #bank-edit-dialog label{font-size:12px;color:#63744f;line-height:1.7}
.integrated-shell #bank-edit-dialog input:not([type=checkbox]),.integrated-shell #bank-edit-dialog select{border-radius:7px;border:1px solid #dfe5d5;background:#fbfcf8;font-size:13px;padding:12px;min-width:0}
@media(max-width:650px){.payment-form-block{padding:16px}.integrated-shell #payment-panel #payment-amount{font-size:29px}.integrated-shell #bank-edit-dialog{padding:20px}.integrated-shell #payment-panel>p:has(#payment-amount){padding:18px}}
/* Cierre: revisión del hecho de pago y referencias conservadas. */
.integrated-shell #purchase-closing-window{padding:25px;border:1px solid #dfe6d5;border-radius:11px;background:#fff}
.integrated-shell #purchase-closing-window h2{font-size:24px;margin:0 0 20px;letter-spacing:-.6px}
.integrated-shell #purchase-closing-review{display:grid;grid-template-columns:minmax(100px,1fr) minmax(0,2fr);gap:0;margin:24px 0;border:1px solid #e1e7d8;border-radius:9px;padding:9px 20px;background:#f8faf4}
.integrated-shell #purchase-closing-review dt,.integrated-shell #purchase-closing-review dd{margin:0;border-bottom:1px solid #e1e7d8;padding:16px 0;line-height:1.7;font-size:12px;overflow-wrap:anywhere}
.integrated-shell #purchase-closing-review dt{color:#82936d;padding-right:15px}
.integrated-shell #purchase-closing-review dd{font-weight:600;color:#2c3a1c}
.integrated-shell #purchase-closing-review dt:last-of-type,.integrated-shell #purchase-closing-review dd:last-of-type{border:0}
.integrated-shell #closing-requirement{font-size:12px;line-height:1.8;color:#79876a;margin:22px 0}
.integrated-shell #purchase-closing-window #close-purchase{margin-top:20px}
@media(max-width:650px){.integrated-shell #purchase-closing-window{padding:17px}.integrated-shell #purchase-closing-review{padding:6px 14px;grid-template-columns:minmax(70px,1fr) minmax(0,2fr)}.integrated-shell #purchase-closing-window h2{font-size:21px}}

/* El avance mensual y la preparación se consultan en Agencias, sin apilarse sobre un proceso. */
.shell-authenticated:not(.shell-agencies-view):not(.shell-home-view) #monthly-summary{display:none!important}
.shell-device-ready:not(.shell-agencies-view) #app-agency-options{display:none!important}
/* Ficha del cliente: misma información, jerarquía y ventanas independientes. */
.integrated-shell #customers-panel{padding:27px;max-width:1180px;margin-inline:auto}
.integrated-shell #customers-panel>.row{padding-bottom:20px;border-bottom:1px solid #e3e8d9;margin-bottom:24px;gap:15px}
.integrated-shell #customers-panel>.row h2{font-size:26px;letter-spacing:-.7px}
.integrated-shell #customer-search-window>label{font-size:12px;color:#778668;font-weight:600}
.integrated-shell #customer-search{font-size:14px;padding:15px;border:1px solid #dfe5d6;background:#fbfcf7;border-radius:8px}
.integrated-shell #customer-results{gap:10px;margin-top:18px}
.integrated-shell #customer-results button{background:#fff;text-align:left;border:1px solid #e2e7da;border-radius:8px;padding:17px 20px;font-size:12px;font-weight:600;color:#344326}
.integrated-shell #customer-results button:hover{background:#f6f9ef;border-color:#b9c9a6}
.integrated-shell #customer-card>h1{font-size:26px;letter-spacing:-.7px;line-height:1.5;margin:23px 0 10px;overflow-wrap:anywhere}
.integrated-shell #customer-card>p{font-size:12px;color:#879475;line-height:1.8}
.integrated-shell .customer-window-navigation{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;margin:20px 0}
.integrated-shell .customer-window-navigation button,.integrated-shell #customer-operation-back{padding:11px 14px;font-size:11px;border-radius:7px;background:#fff}
.integrated-shell .customer-summary{gap:16px;margin:26px 0;grid-template-columns:repeat(2,minmax(0,1fr))}
.integrated-shell .customer-summary>article{background:#fff;border:1px solid #e1e7d8;border-radius:11px;padding:23px;min-width:0}
.integrated-shell .customer-summary>article.featured{background:#000;border-top:3px solid #F4C709;color:#fff}
.integrated-shell .customer-summary article>span,.integrated-shell .customer-summary article>div>span{font-size:11px;color:#849370;line-height:1.7}
.integrated-shell .customer-summary article.featured>span{color:#b0bd9b}
.integrated-shell .customer-summary strong{font-size:30px;letter-spacing:-.8px;display:block;margin:14px 0}
.integrated-shell .customer-summary .featured strong{color:#F4C709}
.integrated-shell .customer-summary p{font-size:12px;line-height:1.8}
.integrated-shell .customer-renewal-summary{padding-top:18px;margin-top:18px;border-top:1px solid #e2e8d9}
.integrated-shell .customer-action-grid{gap:16px;margin:25px 0}
.integrated-shell .customer-action-card{padding:22px;background:#fff;border:1px solid #e1e7d8;border-radius:11px;text-align:left}
.integrated-shell .customer-action-card strong{font-size:15px;line-height:1.6}
.integrated-shell .customer-action-card span{font-size:12px;color:#81916e;line-height:1.8}
.integrated-shell #customer-contact-form label{font-size:12px;color:#728360;font-weight:600}
.integrated-shell #customer-contact-form input{border-radius:7px;border:1px solid #dfe5d5;background:#fbfcf8;padding:13px;font-size:13px}
.integrated-shell #customer-history td{font-size:12px;padding:16px 12px;line-height:1.7}
.integrated-shell #customer-history td .tag{font-size:10px;line-height:1.5;white-space:normal}
.integrated-shell #customer-operation-detail{padding:23px;border:1px solid #e1e7d8;border-radius:10px;background:#fff}
.integrated-shell #customer-operation-detail>h3{font-size:19px;line-height:1.7;margin:20px 0}
.integrated-shell #customer-operation-detail>button{font-size:11px;border-radius:7px;padding:12px 15px;margin:0 10px 12px 0}
.customer-operation-facts{display:grid;grid-template-columns:minmax(110px,1fr) minmax(0,2fr);padding:8px 20px;margin:23px 0;background:#f7faf2;border:1px solid #e0e7d6;border-radius:9px}
.customer-operation-facts dt,.customer-operation-facts dd{font-size:12px;line-height:1.7;margin:0;padding:14px 0;border-bottom:1px solid #e0e7d6;overflow-wrap:anywhere}
.customer-operation-facts dt{color:#7e8f6b;padding-right:16px}
.customer-operation-facts dd{font-weight:600;color:#344326}
.customer-operation-facts dt:last-of-type,.customer-operation-facts dd:last-of-type{border:0}
@media(max-width:650px){.integrated-shell #customers-panel{padding:18px}.integrated-shell #customer-card>h1{font-size:22px}.integrated-shell .customer-summary{gap:12px}.integrated-shell .customer-summary>article{padding:16px}.integrated-shell .customer-summary strong{font-size:23px}.integrated-shell .customer-summary p{font-size:11px}.integrated-shell .customer-action-card{padding:19px}.integrated-shell #customer-operation-detail{padding:15px}.customer-operation-facts{grid-template-columns:minmax(0,1fr);padding:8px 16px}.customer-operation-facts dt{padding-bottom:0;border:0}.customer-operation-facts dd{padding-top:6px}.integrated-shell .customer-window-navigation button{font-size:10px}}
.integrated-shell .customer-action-card.featured{background:#000;color:#fff;border-color:#000}
.integrated-shell .customer-action-card.featured strong{color:#fff}
.integrated-shell .customer-action-card.featured span{color:#b6c59e}
.customer-linked-sales{border:1px solid #d9e6ce;border-radius:9px;padding:20px;margin:24px 0;background:#f5f9ef}
.customer-linked-sales h4{font-size:15px;margin:0 0 18px}
.customer-linked-sales p{font-size:12px;line-height:1.8;overflow-wrap:anywhere}
/* Inventario y separación: presentación común, categorías y motores conservados. */
.integrated-shell #inventory-panel,.integrated-shell #separation-panel{padding:27px;max-width:1180px;margin-inline:auto}
.integrated-shell #inventory-panel>h2,.integrated-shell #separation-panel>h2{font-size:26px;letter-spacing:-.7px;margin-bottom:25px}
.integrated-shell .inventory-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:25px 0}
.integrated-shell .inventory-summary article{padding:23px;background:#fff;border:1px solid #e1e7d8;border-radius:11px;min-width:0}
.integrated-shell .inventory-summary h3{font-size:14px;line-height:1.7;margin:0 0 16px}
.integrated-shell .inventory-summary .inventory-count{display:block;font-size:34px;letter-spacing:-1px;margin:10px 0}
.integrated-shell .inventory-summary .inventory-cost{display:block;font-size:21px;margin-top:9px}
.integrated-shell .inventory-summary p,.integrated-shell .inventory-summary span{font-size:11px;line-height:1.8;color:#81916e}
.integrated-shell .inventory-action-grid{gap:17px;margin:25px 0}
.integrated-shell .inventory-action-card{background:#fff;border:1px solid #e1e7d8;border-radius:11px;padding:23px;text-align:left}
.integrated-shell .inventory-action-card strong{font-size:16px;line-height:1.7}
.integrated-shell .inventory-action-card>span:last-child{font-size:12px;color:#81916e;line-height:1.8}
.integrated-shell .inventory-action-card.featured{background:#000;color:#fff;border-color:#000}
.integrated-shell .inventory-action-card.featured strong{color:#fff}
.integrated-shell .inventory-action-card.featured>span:last-child{color:#b1bf9a}
.integrated-shell #inventory-back-options{font-size:11px;padding:11px 15px;border-radius:7px;background:#fff;margin:0 0 20px}
.integrated-shell #inventory-list-window>h2{font-size:22px;margin:20px 0}
.integrated-shell #inventory-list-window label{font-size:12px;color:#748561;font-weight:600}
.integrated-shell #inventory-search,.integrated-shell #inventory-filter{border:1px solid #dfe5d5;border-radius:7px;background:#fbfcf8;padding:13px;font-size:13px}
.integrated-shell #inventory-rows>tr>td,.integrated-shell #separation-operations>tr>td{font-size:12px;padding:16px 12px;line-height:1.8}
.integrated-shell .stock-badge{font-size:10px;border-radius:5px;line-height:1.6;white-space:normal}
.integrated-shell .stock-detail,.integrated-shell #separation-operations details{padding:21px;border:1px solid #e0e7d6;border-radius:9px;background:#fff}
.integrated-shell .stock-detail-block{border:1px solid #e1e7d8;border-radius:9px;padding:18px;margin:18px 0;background:#f9fbf5}
.integrated-shell .stock-detail-block h3{font-size:14px;margin:0 0 20px}
.integrated-shell .stock-detail-block td{font-size:12px;line-height:1.8;padding:13px 10px}
.integrated-shell .stock-detail-block th{font-size:11px;white-space:normal;line-height:1.6}
.integrated-shell .separation-items fieldset{border:1px solid #e0e7d6;border-radius:9px;padding:22px;background:#f8faf4;margin:20px 0}
.integrated-shell .separation-items label{font-size:12px;color:#71845b;font-weight:600;line-height:1.8;min-width:0}
.integrated-shell .separation-items input,.integrated-shell .separation-items select{border:1px solid #dce4d2;border-radius:7px;background:white;font-size:13px;padding:12px;min-width:0;max-width:100%;box-sizing:border-box}
.integrated-shell #separation-operations button{font-size:11px;border-radius:7px;padding:12px 16px}
.integrated-shell .selection-heading{font-size:14px;font-weight:700;border-top:1px solid #e0e7d6;padding-top:25px;margin-top:25px}
@media(max-width:650px){.integrated-shell #inventory-panel,.integrated-shell #separation-panel{padding:18px}.integrated-shell .inventory-summary{gap:12px}.integrated-shell .inventory-summary article{padding:16px}.integrated-shell .inventory-summary .inventory-count{font-size:29px}.integrated-shell .inventory-summary .inventory-cost{font-size:18px}.integrated-shell .stock-detail,.integrated-shell #separation-operations details{padding:14px}.integrated-shell .stock-detail-block{padding:13px}.integrated-shell .separation-items fieldset{padding:16px;grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){.integrated-shell #separation-operations details,.integrated-shell #inventory-rows .stock-detail{width:calc(100vw - 108px);max-width:100%;box-sizing:border-box}.integrated-shell .separation-items fieldset{width:100%;box-sizing:border-box}.integrated-shell .separation-items fieldset>button{grid-column:1/-1}.integrated-shell .separation-items input,.integrated-shell .separation-items select{width:100%}.integrated-shell .stock-detail-block .table-wrap{max-width:100%;overflow:auto}}
/* Cartera y cuadros de acciones conservan controladores y estados existentes. */
.integrated-shell #retro-panel{padding:27px;max-width:1180px;margin-inline:auto}
.integrated-shell #retro-list-window>h2{font-size:26px;letter-spacing:-.7px;margin:0 0 20px}
.integrated-shell #retro-list-window>.stats{background:#fff;border:1px solid #e0e7d7;border-radius:11px;padding:24px;gap:25px;margin:23px 0}
.integrated-shell #retro-list-window>.stats>span{font-size:12px;color:#7d8e6a;line-height:1.8}
.integrated-shell #retro-capital{font-size:34px;letter-spacing:-1px;color:#1b2710}
.integrated-shell #retro-total{font-size:25px;color:#344326}
.integrated-shell #retro-filter{border:1px solid #dfe5d5;border-radius:7px;background:#fbfcf8;padding:13px;font-size:12px}
.integrated-shell #retro-rows td{font-size:12px;padding:16px 12px;line-height:1.7}
.integrated-shell .retro-interest-heading{white-space:normal;min-width:95px;width:110px;max-width:115px;font-size:11px;line-height:1.6}
.integrated-shell #retro-rows .tag{font-size:10px;white-space:normal;line-height:1.7;border-radius:5px}
.integrated-shell #retro-action-context{padding:20px;border:1px solid #e0e7d6;background:#f7faf2;border-radius:9px;font-size:12px;line-height:1.9}
.integrated-shell .retro-action-cards{gap:17px;margin:26px 0}
.integrated-shell .retro-action-card{background:#fff;border:1px solid #e0e7d6;border-radius:11px;padding:23px;color:#27351b;text-align:left}
.integrated-shell .retro-action-card strong{font-size:16px;line-height:1.7;color:#27351b}
.integrated-shell .retro-action-card span{font-size:12px;color:#82946c;line-height:1.8}
.integrated-shell .retro-action-card.featured{background:#000;border-color:#000;color:#fff}
.integrated-shell .retro-action-card.featured strong{color:#fff}
.integrated-shell .retro-action-card.featured span{color:#b6c59f}
.integrated-shell .retro-fact{padding:20px;border:1px solid #e0e7d6;border-radius:9px;background:#f8faf4;min-width:0}
.integrated-shell .retro-fact>span{font-size:11px;color:#81936b;line-height:1.7}
.integrated-shell .retro-fact>strong{font-size:15px;line-height:1.8;overflow-wrap:anywhere}
.integrated-shell #retro-action-header button:not(.retro-action-card){font-size:11px;padding:12px 15px;border-radius:7px;background:#fff}
.integrated-shell [data-retro-window]>.payment-panel{background:white;border:1px solid #e0e7d6;border-radius:11px;padding:25px}
@media(max-width:650px){.integrated-shell #retro-panel{padding:18px}.integrated-shell #retro-list-window>.stats{padding:18px;gap:19px}.integrated-shell #retro-capital{font-size:28px}.integrated-shell #retro-total{font-size:23px}.integrated-shell .retro-action-card{padding:19px}.integrated-shell .retro-fact{padding:15px}.integrated-shell [data-retro-window]>.payment-panel{padding:17px}}
/* El dinero de la agencia: consulta, conteo y movimientos independientes. */
.integrated-shell #finance-panel{padding:27px;max-width:1180px;margin-inline:auto}
.integrated-shell #finance-panel>.row{align-items:center;flex-wrap:wrap;gap:15px;padding-bottom:20px;margin-bottom:25px;border-bottom:1px solid #e1e7d8}
.integrated-shell #cash-title{font-size:26px;letter-spacing:-.7px;line-height:1.4}
.integrated-shell #finance-panel>.stats{background:#fff;border:1px solid #e0e7d6;border-radius:11px;padding:25px;margin:24px 0;gap:30px}
.integrated-shell #finance-panel>.stats>span{font-size:12px;color:#7f916a;line-height:1.8}
.integrated-shell #cash-balance{font-size:35px;color:#18260d;letter-spacing:-1px}
.integrated-shell #cash-opening{font-size:24px;color:#334425}
.integrated-shell .finance-action-grid{gap:18px;margin:26px 0}
.integrated-shell .finance-action-card{padding:23px;background:#fff;border:1px solid #e0e7d6;border-radius:11px;text-align:left;color:#29391b}
.integrated-shell .finance-action-card strong{font-size:16px;line-height:1.7;color:#29391b}
.integrated-shell .finance-action-card span{font-size:12px;line-height:1.8;color:#82956b}
.integrated-shell .finance-action-card.featured{background:#000;border-color:#000;color:#fff}
.integrated-shell .finance-action-card.featured strong{color:#fff}
.integrated-shell .finance-action-card.featured span{color:#b7c69f}
.integrated-shell #cash-options{font-size:11px;border-radius:7px;padding:11px 15px;background:#fff}
.integrated-shell [data-finance-window]>details,.integrated-shell #cash-movement-form{padding:24px;border:1px solid #e0e7d6;border-radius:10px;background:#fff}
.integrated-shell #cash-count{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:23px 0}
.integrated-shell #cash-count>div{border:1px solid #e0e7d6;border-radius:9px;background:#f7faf2;padding:20px;min-width:0}
.integrated-shell #cash-count h3{font-size:17px;margin:0 0 23px}
.integrated-shell #cash-count label{font-size:12px;gap:15px;align-items:center}
.integrated-shell #cash-count input{font-size:14px;border:1px solid #dbe4d0;border-radius:7px;background:#fff;padding:12px;min-width:0;max-width:100%;box-sizing:border-box}
.integrated-shell #cash-movement-form label{font-size:12px;font-weight:600;color:#758962;line-height:1.8}
.integrated-shell #cash-movement-form input:not([type=checkbox]),.integrated-shell #cash-movement-form select,.integrated-shell #cash-history-day{font-size:13px;padding:13px;border:1px solid #dce5d2;border-radius:7px;background:#fbfcf8;min-width:0}
.integrated-shell #cash-movements td{font-size:12px;line-height:1.8;padding:16px 12px}
.integrated-shell #cash-movement-done{border:1px solid #d8e6cc;border-radius:11px;background:#f5faef;padding:27px}
.integrated-shell #cash-movement-done h3{font-size:23px;letter-spacing:-.5px}
.integrated-shell #cash-movement-done p{font-size:13px;line-height:1.9;color:#788e61}
.integrated-shell #cash-movement-done button{font-size:11px;border-radius:7px;padding:12px 16px;margin:10px 10px 0 0}
@media(max-width:650px){.integrated-shell #finance-panel{padding:18px}.integrated-shell #cash-title{font-size:23px}.integrated-shell #finance-panel>.stats{padding:18px;gap:20px}.integrated-shell #cash-balance{font-size:29px}.integrated-shell #cash-opening{font-size:22px}.integrated-shell #cash-count{gap:12px}.integrated-shell #cash-count>div{padding:13px}.integrated-shell #cash-count label{gap:7px;font-size:11px}.integrated-shell #cash-count input{padding:9px}.integrated-shell [data-finance-window]>details,.integrated-shell #cash-movement-form{padding:17px}}
/* Centro de ventas: ventanas existentes y consulta de historial diferenciada. */
.integrated-shell #classification-panel{padding:27px;max-width:1180px;margin-inline:auto}
.integrated-shell .sales-window-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;padding-bottom:20px;border-bottom:1px solid #e1e7d8;margin-bottom:24px}
.integrated-shell .sales-window-heading h2{font-size:26px;letter-spacing:-.7px}
.integrated-shell .sales-action-grid,.integrated-shell .sales-tracking-grid{gap:17px;margin:23px 0}
.integrated-shell .sales-action-card{padding:23px;background:#fff;border:1px solid #e0e7d6;border-radius:11px;color:#2b3a1d}
.integrated-shell .sales-action-copy strong{font-size:16px;line-height:1.7;color:#2b3a1d}
.integrated-shell .sales-action-copy span{font-size:12px;line-height:1.8;color:#81936d}
.integrated-shell .sales-action-card.sales-action-featured{background:#000;border-color:#000;color:#fff}
.integrated-shell .sales-action-featured .sales-action-copy strong{color:#fff}
.integrated-shell .sales-action-featured .sales-action-copy span{color:#b7c69f}
.integrated-shell #classification-panel input:not([type=checkbox]),.integrated-shell #classification-panel select{font-size:13px;border:1px solid #dfe6d5;border-radius:7px;background:#fbfcf8;padding:12px;min-width:0}
.integrated-shell #classification-panel th{font-size:11px;line-height:1.7;white-space:normal}
.integrated-shell #classification-panel td{font-size:12px;line-height:1.8;padding:14px 11px}
.integrated-shell #classification-panel button{border-radius:7px}
.integrated-shell #classification-panel .process-progress{gap:10px;margin:25px 0}
.integrated-shell #classification-panel .process-progress li{font-size:12px;padding:13px;border:1px solid #dfe6d5;border-radius:7px;background:#f8faf4;line-height:1.7}
.integrated-shell #classification-panel .process-progress li.current{background:#000;color:#fff;border-color:#000}
.integrated-shell #sales-report-dialog{width:min(1200px,95vw);max-height:92vh;padding:28px;border:1px solid #e0e7d6;border-radius:12px;box-sizing:border-box}
.integrated-shell #sales-report-dialog h2{font-size:27px;letter-spacing:-.7px}
.integrated-shell #sales-report-dialog label{font-size:12px;color:#7b8e65;font-weight:600}
.integrated-shell #sales-report-dialog select,.integrated-shell #sales-report-dialog input{font-size:13px;border:1px solid #dfe6d5;border-radius:7px;background:#fbfcf8;padding:12px;min-width:0}
.integrated-shell .sales-history-mode #sales-report-summary,.integrated-shell .sales-history-mode [data-report-only],.integrated-shell .sales-history-mode #sales-report-detail-total,.integrated-shell .sales-history-mode #sales-report-note{display:none!important}
.sales-history-mode #sales-report-rows td:nth-child(n+5):nth-child(-n+8){display:none}
.sales-history-mode #sales-report-rows tr[data-sale-kind=joya] td:first-child{border-left:4px solid #8650a0;background:#faf4fd}
.sales-history-mode #sales-report-rows tr[data-sale-kind=material] td:first-child{border-left:4px solid #3d70a7;background:#f2f7fd}
.sales-history-mode table:has(#sales-report-rows) th:nth-child(n+5):nth-child(-n+8){display:none}
@media(max-width:650px){.integrated-shell #classification-panel{padding:18px}.integrated-shell .sales-window-heading h2{font-size:23px}.integrated-shell .sales-action-card{padding:19px}.integrated-shell #sales-report-dialog{padding:19px}.integrated-shell #classification-panel .process-progress{gap:6px}.integrated-shell #classification-panel .process-progress li{padding:10px 6px;font-size:10px}}
/* Cuadro de precios: edición explícita y celdas calculadas diferenciadas. */
.integrated-shell #pricing-dialog{width:min(1370px,96vw);max-height:93vh;border:1px solid #e0e7d6;border-radius:12px;padding:28px;box-sizing:border-box}
.integrated-shell #pricing-heading{font-size:27px;letter-spacing:-.7px}
.integrated-shell #pricing-dialog>.row{gap:14px;flex-wrap:wrap;padding-bottom:20px;border-bottom:1px solid #e0e7d6;margin-bottom:20px}
.integrated-shell #pricing-dialog button{font-size:12px;border-radius:7px;padding:12px 16px}
.integrated-shell #pricing-editor>.form-grid{border:1px solid #e0e7d6;border-radius:10px;background:#f8faf4;padding:22px;gap:24px;margin:23px 0}
.integrated-shell #pricing-dialog label{font-size:12px;font-weight:600;color:#768b60;line-height:1.8;min-width:0}
.integrated-shell #pricing-dialog input,.integrated-shell #pricing-dialog select{font-size:13px;border:1px solid #dfe6d5;border-radius:7px;padding:12px;background:#fff;min-width:0;max-width:100%;box-sizing:border-box}
.integrated-shell #pricing-dialog input:disabled{background:#f3f5ef;color:#657451;border-color:#e1e6da;opacity:1}
.integrated-shell #pricing-gram{display:block;font-size:27px;color:#273a16;letter-spacing:-.6px;margin-top:12px}
.integrated-shell #pricing-agencies table{border:1px solid #e0e7d6}
.integrated-shell #pricing-agencies th{font-size:11px;line-height:1.8;white-space:normal;padding:15px 12px}
.integrated-shell #pricing-agencies td{font-size:12px;padding:12px 10px;line-height:1.8}
.integrated-shell #pricing-agencies input{min-width:80px;width:100px;padding:11px 9px}
.integrated-shell #pricing-agencies .pricing-derived{background:#f1f3ec;color:#667753}
.integrated-shell #pricing-agencies .pricing-buy{background:#e8f2dc;color:#284711;font-weight:700}
.integrated-shell #pricing-matrix-note,.integrated-shell #pricing-network{font-size:12px;line-height:1.9;padding:16px 19px;background:#f7faf2;border:1px solid #e0e7d6;border-radius:8px}
.integrated-shell #pricing-status{font-size:12px;line-height:1.8}
@media(max-width:650px){.integrated-shell #pricing-dialog{padding:19px}.integrated-shell #pricing-heading{font-size:24px}.integrated-shell #pricing-editor>.form-grid{padding:17px;grid-template-columns:minmax(0,1fr)}.integrated-shell #pricing-dialog button{font-size:11px}.integrated-shell #pricing-agencies input{min-width:76px;width:90px}}
/* Aprobaciones y administración: consultas independientes y edición explícita. */
.shell-approvals-view #agency-view,.shell-approvals-view #users-view,.shell-approvals-view #monthly-summary,.shell-approvals-view #quick-dialog{display:none!important}
.integrated-shell #approvals-panel,.integrated-shell #users-view{padding:27px;max-width:1120px;margin-inline:auto;border:1px solid #e0e7d6;border-radius:12px;background:#fff}
.integrated-shell #approvals-panel h2,.integrated-shell #users-view>h2{font-size:26px;letter-spacing:-.7px;line-height:1.5}
.integrated-shell #approvals-note{font-size:12px;line-height:1.9;color:#7c9064;padding:18px;background:#f7faf2;border:1px solid #e0e7d6;border-radius:9px}
.integrated-shell #approvals-list{display:grid;gap:17px;margin:24px 0}
.integrated-shell .approval-item{padding:22px;border:1px solid #e0e7d6;border-left:4px solid #F4C709;border-radius:9px;background:#fff}
.integrated-shell .approval-item strong{font-size:16px;line-height:1.8}
.integrated-shell .approval-item p{font-size:12px;line-height:1.8;color:#7d9066}
.integrated-shell .approval-item button,.integrated-shell #approvals-close{font-size:12px;padding:12px 16px;border-radius:7px}
.integrated-shell #users-view>p{font-size:12px;color:#7c9064;line-height:1.9}
.integrated-shell #users-view label{font-size:12px;color:#6e8457;font-weight:600;line-height:1.8}
.integrated-shell #users-view select{font-size:13px;border:1px solid #dfe6d5;border-radius:7px;padding:13px;background:#fbfcf8;min-width:0;max-width:100%}
.integrated-shell #access-form{border-top:1px solid #e0e7d6;padding-top:24px;margin-top:25px}
.integrated-shell #access-form fieldset{border:1px solid #dfe6d5;background:#f7faf2;border-radius:9px;padding:21px;margin:23px 0}
.integrated-shell #access-form legend{font-size:13px;font-weight:600;color:#667e4d;padding:0 9px}
.integrated-shell #scope-note{font-size:12px;color:#82966b;line-height:1.9;margin:23px 0}
.integrated-shell #save-access{font-size:12px;border-radius:7px;padding:14px 19px}
@media(max-width:650px){.integrated-shell #approvals-panel,.integrated-shell #users-view{padding:18px}.integrated-shell #users-view>h2,.integrated-shell #approvals-panel h2{font-size:23px}.integrated-shell .approval-item{padding:17px}.integrated-shell #access-form .form-grid{grid-template-columns:minmax(0,1fr)}}

/* Inicio conserva los controles y el resumen mensual originales. */
.shell-home-view #agency-view,.shell-home-view #users-view,.shell-home-view #app-agency-options{display:none!important}
.integrated-shell #app-home[hidden]{display:none!important}
#app-home h1{font-size:26px;margin:0 0 8px}#app-home>p{color:#65705e;margin:0 0 24px}
.shell-home-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:12px}
.shell-home-actions button{display:flex;flex-direction:column;align-items:flex-start;gap:18px;background:#fafaf7;border:1px solid #dedfd6;padding:20px;border-radius:10px;font-size:14px;font-weight:600}
.shell-home-actions button:first-child{background:#F4C709;border-color:#F4C709;color:#000}
.shell-home-actions svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.6}
.shell-home-actions button[hidden]{display:none}
@media(max-width:600px){#app-home h1{font-size:22px}.shell-home-actions{grid-template-columns:1fr 1fr}.shell-home-actions button{padding:15px;font-size:12px}}

/* Configuración de fundas: presentación, sin cambiar numeración ni permisos. */
.integrated-shell #bag-settings-dialog{width:min(780px,calc(100vw - 32px));max-height:calc(100dvh - 32px);box-sizing:border-box;border:1px solid #dedfd6;border-radius:14px;padding:28px;background:#fff}
#bag-settings-dialog h2{font-size:23px;margin:0}#bag-settings-dialog label{display:grid;gap:8px;font-size:13px;font-weight:600}
#bag-settings-dialog input,#bag-settings-dialog select,#bag-settings-dialog textarea{box-sizing:border-box;min-width:0;width:100%;padding:12px;border:1px solid #d9ddd2;border-radius:8px;background:#fafaf7;color:#111}
#bag-settings-form{display:grid;gap:18px}#bag-settings-dialog table{font-size:12px}#bag-settings-dialog button{border-radius:8px}
@media(max-width:600px){.integrated-shell #bag-settings-dialog{padding:18px}#bag-settings-dialog h2{font-size:20px}#bag-settings-dialog .row{flex-wrap:wrap}}

#home-retro{margin-top:28px;border-top:1px solid #e3e5dc;padding-top:22px}#home-retro h2{font-size:18px;margin:0 0 10px}#home-retro-note{font-size:12px;color:#68745e}#home-retro-rows{display:grid;gap:10px}.home-retro-item{display:grid;grid-template-columns:1fr auto;gap:10px;border:1px solid #e2e5dc;border-radius:9px;padding:16px}.home-retro-item>strong{font-size:13px}.home-retro-item>p{margin:0;font-size:12px;color:#626b5b}.home-retro-item button{font-size:12px;border-radius:7px}@media(max-width:600px){.home-retro-item{grid-template-columns:1fr}.home-retro-item .tag{justify-self:start}.home-retro-item button{justify-self:start}}

/* Consultas de ventas: datos separados, sin cambiar columnas ni cálculos. */
#sales-report-dialog .sales-report-summary article{border-radius:10px;border-color:#e0e3d9}#sales-report-dialog .sales-report-summary span{font-size:12px;color:inherit}#sales-report-dialog .sales-report-summary strong{font-size:25px;letter-spacing:-.5px}
#sales-report-dialog .sale-reference>strong{display:block;font-size:13px;margin-top:8px}#sales-report-dialog .sale-reference>small{font-size:10px;color:#68715e}#sales-report-dialog .sale-kind{display:inline-block;font-size:10px;font-weight:600;padding:4px 8px;border-radius:5px}#sales-report-dialog .sale-kind.material{background:#eaf2fc;color:#2b5c90}#sales-report-dialog .sale-kind.jewelry{background:#f3eaf9;color:#754593}
#sales-report-dialog .sale-status{display:inline-block;border-radius:5px;padding:6px 9px;font-size:11px;font-weight:600;white-space:nowrap}#sales-report-dialog .sale-status.paid{background:#ddf2e4;color:#17603c}#sales-report-dialog .sale-status.pending{background:#fff1c6;color:#765700}#sales-report-dialog .sale-status.review{background:#fbe1df;color:#9a2525}
#sales-report-dialog .form-grid{padding:16px;border:1px solid #e0e4d8;background:#fafbf7;border-radius:10px}#sales-report-dialog .sales-report-total{border-radius:9px;font-size:13px;line-height:1.7}
@media(max-width:650px){#sales-report-dialog .sales-report-summary strong{font-size:20px}#sales-report-dialog .form-grid{padding:12px}}

/* Venta de joyas: mismo marco y campos que los procesos conectados. */
.integrated-shell #jewelry-dialog{width:min(1000px,calc(100vw - 32px));max-height:calc(100dvh - 32px);box-sizing:border-box;border:1px solid #e0e4d8;border-radius:14px;padding:28px;background:#fff}
#jewelry-dialog h2{font-size:26px;letter-spacing:-.6px;margin:0}#jewelry-dialog h3{font-size:18px}#jewelry-dialog label{font-size:12px;font-weight:600;color:#68745e}#jewelry-dialog input:not([type=checkbox]),#jewelry-dialog select{width:100%;min-width:0;box-sizing:border-box;padding:12px;border:1px solid #dce1d3;border-radius:8px;background:#fafbf7;color:#111}
#jewelry-dialog button{border-radius:8px}#jewelry-dialog .process-progress li{font-size:12px;border-radius:7px 7px 0 0}#jewelry-dialog .jewelry-context{border:1px solid #e0e4d8;border-radius:8px;font-size:13px;padding:15px}#jewelry-products button{border:1px solid #e0e4d8;background:#fafbf7;padding:18px;text-align:left}#jewelry-history-view{border-top:1px solid #e0e4d8;padding-top:18px}#jewelry-step-4{padding:22px;background:#edf6ee;border-radius:9px}
@media(max-width:600px){.integrated-shell #jewelry-dialog{padding:18px}#jewelry-dialog h2{font-size:22px}#jewelry-dialog .process-progress li{font-size:10px;padding:10px 6px}#jewelry-dialog .buttons{flex-wrap:wrap}}
/* Simulación de venta independiente de los procesos que registran dinero. */
.integrated-shell #sale-simulation-dialog{width:min(1100px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box;border:1px solid #dce2d2;border-radius:14px;padding:26px;background:#fff}#sale-simulation-dialog h2{font-size:25px;margin:0}#sale-simulation-dialog label{display:grid;gap:8px;font-size:13px;font-weight:600;margin:16px 0}#sale-simulation-dialog input:not([type=checkbox]){width:100%;min-width:100px;box-sizing:border-box;border:1px solid #dce2d2;border-radius:7px;background:#fafbf7;padding:11px;font-size:13px}#sale-simulation-dialog table input{max-width:180px}#simulation-inline-error{font-size:13px;color:#68735d}#simulation-agency{background:#fff8d8;border-radius:8px;padding:14px;font-size:13px}.simulation-result{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}.simulation-result article{padding:18px;border:1px solid #e0e4d8;background:#f8f9f5;border-radius:9px}.simulation-result span{display:block;font-size:12px}.simulation-result strong{display:block;font-size:23px;margin-top:10px}.simulation-result.positive article:last-child{background:#e1f2e5;color:#1b613b}.simulation-result.negative article:last-child{background:#fde3df;color:#9b2828}@media(max-width:600px){.integrated-shell #sale-simulation-dialog{padding:18px}#sale-simulation-dialog h2{font-size:21px}.simulation-result{grid-template-columns:1fr}#sale-simulation-dialog .process-progress li{font-size:10px;padding:9px 5px}#sale-simulation-dialog .row{flex-wrap:wrap}#sale-simulation-dialog .buttons{flex-wrap:wrap}}
