/* Métrica · Panel y área privada v63. La web pública conserva sus estilos. */
body.mshell{--mp-bg:#f5f6f3;--mp-surface:#fff;--mp-side:#fcfcfa;--mp-ink:#203b4c;--mp-muted:#66767d;--mp-line:#e2e7e3;--mp-green:#2f7556;--mp-soft:#edf5ef;--mp-amber:#966322;--mp-amber-bg:#fff5e5;--mp-error:#a33232;background:var(--mp-bg);color:var(--mp-ink)}
[data-theme=dark] body.mshell{--mp-bg:#101c25;--mp-surface:#192832;--mp-side:#14212b;--mp-ink:#ebf0ed;--mp-muted:#a6b5bb;--mp-line:#31434b;--mp-green:#8fd2ab;--mp-soft:#203c31;--mp-amber:#efbf7b;--mp-amber-bg:#3c3122;--mp-error:#ffb0a6}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]):not([data-theme=dark]) body.mshell{--mp-bg:#101c25;--mp-surface:#192832;--mp-side:#14212b;--mp-ink:#ebf0ed;--mp-muted:#a6b5bb;--mp-line:#31434b;--mp-green:#8fd2ab;--mp-soft:#203c31;--mp-amber:#efbf7b;--mp-amber-bg:#3c3122;--mp-error:#ffb0a6}}
body.mshell header.nav,body.mshell footer.footer{display:none!important}
body.mshell #app{margin-left:210px}
body.mshell #mShell{display:flex;position:fixed;inset:0 auto 0 0;width:210px;background:var(--mp-side)!important;color:var(--mp-ink);border-right:1px solid var(--mp-line);z-index:60;flex-direction:column}
#mShell .msBrand{padding:26px 19px 24px;border-bottom:0;display:block}
#mShell .msBrand img{display:block;width:172px;height:auto;background:#f7faf6;border-radius:4px}
#mShell .msSub{font-size:11px;letter-spacing:.02em;color:var(--mp-muted);margin-top:12px}
#mShell nav{padding:0 10px;gap:4px}
#mShell h3{color:var(--mp-muted);font-size:11px;font-weight:500;letter-spacing:.07em}
#mShell .msi{min-height:44px;padding:10px 12px;color:var(--mp-ink);font-weight:400;border-radius:8px}
#mShell .msi:hover{background:var(--mp-bg);color:var(--mp-ink)}
#mShell .msi.on{background:var(--mp-soft);color:var(--mp-green);font-weight:600}
#mShell .msFoot{border-top:1px solid var(--mp-line)}
body.mshell .page>.container{max-width:1400px;padding:30px 32px 50px}
body.mshell .page>.container>.section-title,body.mshell .page>.container>.section-head{display:none}
body.mshell .page>.container>.body-lg,body.mshell .page>.container>h2,body.mshell .page>.container>.eyebrow-main,body.mshell .page>.container>.lead{display:none}
body.mshell .card,body.mshell .stat-card{background:var(--mp-surface);border:1px solid var(--mp-line);box-shadow:none;border-radius:12px;color:var(--mp-ink)}
body.mshell .area-hero{background:transparent;border:0;padding:0 0 22px;color:var(--mp-ink)}
body.mshell .area-hello{font-family:Inter,Arial,sans-serif;font-size:25px;font-weight:600;color:var(--mp-ink)}
body.mshell .area-sub{color:var(--mp-muted)}
body.mshell .area-avatar{background:var(--mp-soft);color:var(--mp-green);box-shadow:none}
body.mshell .tabs{gap:18px;border-color:var(--mp-line);overflow:auto;white-space:nowrap}
body.mshell .tab{font-weight:500;font-size:13px;min-height:44px;color:var(--mp-muted)}
body.mshell .tab.on{color:var(--mp-green);border-color:var(--mp-green)}
body.mshell .field-input{background:var(--mp-surface);border-color:var(--mp-line);color:var(--mp-ink);border-radius:8px}
body.mshell .panel-toolbar{background:var(--mp-surface);border:1px solid var(--mp-line);border-radius:12px;padding:15px;gap:10px;align-items:center}
body.mshell .panel-toolbar #panelSearch{max-width:370px}
body.mshell .view-toggle{flex-wrap:wrap;gap:4px;background:var(--mp-bg)}
body.mshell .vt{min-height:40px;font-size:12px;padding:8px 10px}
body.mshell .stat-card{padding:18px}.mshell .sc-num{font-size:28px;color:var(--mp-ink)}
body.mshell .list-row{padding:17px 18px}.mshell .cc-avatar{background:var(--mp-soft);color:var(--mp-green)}
body.mshell .kcol{background:var(--mp-side);border-color:var(--mp-line)}
body.mshell .drawer{width:min(1000px,calc(100vw - 28px));max-width:none;background:var(--mp-bg);color:var(--mp-ink)}
body.mshell .drawer-head{background:var(--mp-surface);border-color:var(--mp-line);padding:20px 24px}
body.mshell .drawer-body{padding:22px 24px}
.mp-legacy{margin-top:22px;padding:14px 18px;background:var(--mp-surface);border:1px solid var(--mp-line);border-radius:10px}
.mp-legacy>summary{font-weight:600;min-height:44px;display:list-item;padding:9px 0;color:var(--mp-green);cursor:pointer}
.mp-legacy-body{padding-top:18px}
.mp-admin-title{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:20px}
.mp-admin-title h2{font-family:Inter,Arial,sans-serif;font-size:25px;font-weight:600;margin:0}
.mp-admin-title p{color:var(--mp-muted);margin:5px 0 0;font-size:13px}
.mp-admin-actions{position:relative}.mp-admin-actions summary{padding:8px 12px;border:1px solid var(--mp-line);border-radius:8px;min-height:44px;cursor:pointer}
.mp-admin-actions>div{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;max-width:620px}
.mp-portal{font-family:Inter,Arial,sans-serif;font-size:14px;color:var(--mp-ink);min-width:0}
.mp-portal *{box-sizing:border-box}.mp-portal h2{font-family:inherit;font-size:22px;font-weight:600;margin:0}.mp-portal h3{font-family:inherit;font-size:16px;font-weight:600;margin:0 0 6px}
.mp-portal p{margin:5px 0 0;line-height:1.6}.mp-portal button,.mp-portal input,.mp-portal textarea,.mp-portal select{font:inherit}
.mp-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:22px}.mp-head p,.mp-muted{color:var(--mp-muted)}
.mp-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.mp-between{justify-content:space-between}
.mp-panel{background:var(--mp-surface);border:1px solid var(--mp-line);border-radius:12px;padding:20px;margin-bottom:16px;min-width:0}
.mp-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.mp-grid>.mp-panel{margin-bottom:0}
.mp-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}
.mp-metric{background:var(--mp-surface);border:1px solid var(--mp-line);border-radius:10px;padding:17px}
.mp-metric small{display:block;color:var(--mp-muted);font-size:12px}.mp-metric strong{display:block;font-size:25px;font-weight:600;margin-top:7px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.mp-metric span{font-size:12px;color:var(--mp-muted)}
.mp-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:9px 13px;min-height:44px;border:1px solid var(--mp-line);border-radius:8px;background:var(--mp-surface);color:var(--mp-ink);text-decoration:none;font-size:13px;cursor:pointer;white-space:normal;text-align:center}
.mp-button.mp-primary{background:var(--green-ink);border-color:var(--green-ink);color:#fff}.mp-button:disabled{opacity:.6;cursor:wait}.mp-button:focus-visible,.mp-portal input:focus-visible,.mp-portal textarea:focus-visible,.mp-portal select:focus-visible{outline:2px solid var(--mp-green);outline-offset:2px}
.mp-button.mp-link{background:transparent;border-color:transparent;color:var(--mp-green);padding:7px 0}
.mp-list{display:grid;gap:0}.mp-list-item{padding:16px 0;border-bottom:1px solid var(--mp-line);display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.mp-list-item:last-child{border:0}.mp-list-item:first-child{padding-top:4px}.mp-list-item>div{min-width:0}.mp-list-item h3{font-size:14px}.mp-list-item p{font-size:13px}.mp-list-item .mp-button{flex:none}
.mp-badge{display:inline-block;border-radius:5px;padding:4px 8px;font-size:12px;background:var(--mp-soft);color:var(--mp-green)}.mp-badge.mp-pending{background:var(--mp-amber-bg);color:var(--mp-amber)}.mp-badge.mp-neutral{background:var(--mp-bg);color:var(--mp-muted)}
.mp-nav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}.mp-nav button[aria-selected=true]{background:var(--mp-soft);color:var(--mp-green);border-color:var(--mp-green)}
.mp-form{display:grid;gap:16px}.mp-form label{display:grid;gap:6px;font-size:13px;font-weight:500;color:var(--mp-ink)}
.mp-form input,.mp-form textarea,.mp-form select,.mp-filter{width:100%;min-height:44px;border:1px solid var(--mp-line);background:var(--mp-surface);color:var(--mp-ink);padding:10px 12px;border-radius:8px;font-weight:400}
.mp-form textarea{min-height:100px;resize:vertical}.mp-form .mp-row label{flex:1;min-width:140px}.mp-form .mp-metrics label{min-width:0}.mp-form input[type=checkbox]{width:20px;min-height:20px}
.mp-form .mp-check{display:flex;gap:10px;align-items:center}.mp-form .mp-check input{flex:none}
.mp-error{color:var(--mp-error);font-size:13px;margin-top:10px}.mp-status{color:var(--mp-green);font-size:13px;min-height:20px}.mp-empty{color:var(--mp-muted);padding:18px 0;font-size:14px}
.mp-prose{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}.mp-report-section{margin-top:22px;padding-top:18px;border-top:1px solid var(--mp-line)}
.mp-chat{display:grid;gap:14px;max-height:420px;overflow:auto;padding:10px 0 18px}.mp-message{background:var(--mp-bg);border-radius:10px;padding:13px 15px;max-width:90%;width:fit-content}.mp-message.mp-own{margin-left:auto;background:var(--mp-soft)}.mp-message p{white-space:pre-wrap;overflow-wrap:anywhere}.mp-message small{display:block;color:var(--mp-muted);font-size:12px;margin-top:7px}
.mp-thread-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:18px}.mp-thread-list{display:flex;flex-direction:column;gap:7px}.mp-thread-list .mp-button{justify-content:flex-start;text-align:left}.mp-thread-list .mp-button[aria-pressed=true]{background:var(--mp-soft);color:var(--mp-green)}
.mp-welcome{border-left:3px solid var(--mp-green)}.mp-timeline{padding-left:18px;border-left:2px solid var(--mp-line)}.mp-timeline .mp-list-item{display:block}
.mp-table-wrap{overflow:auto}.mp-table{width:100%;border-collapse:collapse;font-size:13px}.mp-table th,.mp-table td{text-align:left;padding:12px;border-bottom:1px solid var(--mp-line)}.mp-table th{font-size:12px;color:var(--mp-muted);font-weight:500}
.mp-tool-context{background:var(--mp-bg);padding:12px 14px;border-radius:8px;font-size:13px;color:var(--mp-muted);margin:12px 0}.mp-selected{outline:2px solid var(--mp-green);outline-offset:2px}
@media(max-width:1100px){.mp-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}body.mshell .page>.container{padding:26px 22px}.mp-thread-layout{grid-template-columns:180px 1fr}}
@media(max-width:780px){body.mshell #app{margin-left:0}body.mshell #mShell{position:relative;width:100%;border-right:0;border-bottom:1px solid var(--mp-line);inset:auto}#mShell .msBrand{padding:17px 18px;display:flex;align-items:center;justify-content:space-between;gap:18px}#mShell .msBrand img{width:150px}#mShell .msSub{margin:0}#mShell nav{overflow:auto;display:block;padding:0 10px 10px}#mShell #msNav{display:flex;gap:4px;min-width:max-content}#mShell h3,#mShell #msNav2,#mShell .msFoot{display:none}#mShell .msi{width:auto;white-space:nowrap}body.mshell .tabs{display:flex!important}body.mshell .bnav{display:none!important}body.mshell.bnav-on{padding-bottom:0}body.mshell .page>.container{padding:22px 14px 40px}.mp-grid{grid-template-columns:1fr}.mp-thread-layout{grid-template-columns:1fr}.mp-thread-list{flex-direction:row;overflow:auto}.mp-thread-list .mp-button{flex:none;max-width:230px}.mp-head{flex-wrap:wrap}.mp-list-item{flex-wrap:wrap}.mp-form input,.mp-form select,.mp-form textarea{font-size:16px}.mp-panel{padding:17px}.mp-metric{padding:14px}.mp-metric strong{font-size:22px}body.mshell .drawer{width:100vw;height:100dvh;max-height:none;border-radius:0}body.mshell .drawer-head{padding:16px}.mshell .drawer-body{padding:18px 14px}.mshell .area-hero{gap:12px}.mshell .area-hello{font-size:21px}}
@media(max-width:400px){.mp-metrics{gap:8px}.mp-metric strong{font-size:20px}.mp-metric small{font-size:11px}.mp-list-item .mp-button{width:100%}.mp-nav{gap:5px}.mp-nav .mp-button{padding:8px 10px;font-size:12px}.mp-form .mp-metrics{grid-template-columns:1fr}.mp-form .mp-row{display:grid;grid-template-columns:1fr}.mp-form .mp-row label{min-width:0}body.mshell .panel-toolbar #panelSearch{min-width:0!important;width:100%}}
@media print{#mShell,.mp-nav,.mp-form,.mp-button,.mshell .tabs,.mshell .area-hero{display:none!important}body.mshell #app{margin:0}.mp-panel{break-inside:avoid;border:0}.mp-portal{color:#203b4c}.drawer-scrim{display:none}}

body.mshell #statCards[hidden],body.mshell #filterChips[hidden]{display:none!important}

body.mshell .page{padding:0;min-height:0}
body.mshell .mp-portal>section:not(.mp-panel){padding:0;margin-bottom:20px}
body.mshell .area-hero .btn-secondary{color:var(--mp-ink);background:var(--mp-surface);border:1px solid var(--mp-line)}
body.mshell .tabs{background:transparent;box-shadow:none;border-radius:0;padding:0 0 8px}
body.mshell .tab.on{background:var(--mp-soft)!important;color:var(--mp-green)!important}
@media(min-width:781px){body.mshell #clientesBody>.tabs{display:none!important}}

#mShell #msMobileMenu{display:none;min-height:44px;border:1px solid var(--mp-line);border-radius:8px;background:var(--mp-surface);color:var(--mp-ink);padding:8px 12px;font:inherit;font-size:12px}
@media(max-width:780px){#mShell #msMobileMenu{display:block}#mShell .msFoot.mobile-open{display:flex;flex-direction:row;flex-wrap:wrap}#mShell .msBrand .msSub{display:none}}

body.mshell .view-toggle{display:none!important}
.mp-grid{align-items:start}
@media(min-width:781px){body.mshell #panelLogout{display:none}}
@media print{body.mp-print-report *{visibility:hidden!important}body.mp-print-report .mp-print-target,body.mp-print-report .mp-print-target *{visibility:visible!important}body.mp-print-report .mp-print-target{position:absolute;inset:0 auto auto 0;width:100%;padding:24px;border:0}body.mp-print-report .mp-legacy{display:none!important}}

@media print{body.mp-print-report .drawer{position:static!important;transform:none!important;overflow:visible!important;width:auto!important;height:auto!important;max-height:none!important}body.mp-print-report .drawer-body{overflow:visible!important}.mp-report-brand{display:block!important;width:160px;height:auto;margin-bottom:20px}}
.mp-report-brand{display:none}

body.mshell #clientesBody>.tabs{display:none!important}
.mp-report-section{padding:18px 0 0}
body.mshell{background:var(--mp-bg)!important}

.mp-print-root{display:none}
@media print{body.mp-print-report>:not(.mp-print-root){display:none!important}body.mp-print-report>.mp-print-root{display:block!important;visibility:visible!important;--mp-surface:#fff;--mp-ink:#203b4c;--mp-muted:#66767d;--mp-line:#e2e7e3;--mp-bg:#f5f6f3;--mp-green:#2f7556;--mp-soft:#edf5ef}.mp-print-root .mp-print-target{position:static!important;inset:auto!important;visibility:visible!important;padding:16px!important;width:100%!important;break-inside:auto!important}.mp-print-root .mp-print-target *{visibility:visible!important}.mp-print-root .mp-metric strong{font-size:21px}.mp-print-root .mp-metrics{grid-template-columns:repeat(4,1fr)}.mp-print-root .mp-report-section{margin-top:14px;padding-top:14px}}
