/* RECUPERO Dashboard — una historia de cartera basada en clientes únicos */
.dashboard-screen{--db-ink:#102f5f;--db-blue:#2f6df6;--db-green:#159b6d;--db-purple:#8b5cf6;--db-orange:#e97c28;--db-amber:#d89b1f;--db-line:#e1e8f1;position:relative}
.db-header{display:flex;align-items:flex-end;justify-content:space-between;gap:1.25rem;margin-bottom:1.15rem;padding:1rem 0 1.1rem;border-bottom:1px solid #e5ebf4}
.db-header-text{min-width:250px}.db-eyebrow{display:block;margin-bottom:.38rem;color:var(--db-blue);font-size:.62rem;font-weight:900;letter-spacing:.15em;text-transform:uppercase}.db-title{margin:0;color:#10233f;font-size:1.55rem;font-weight:850;letter-spacing:-.025em;line-height:1.15}.db-subtitle,.db-panel-subtitle{margin:.38rem 0 0;color:#8090a5;font-size:.76rem;line-height:1.45}
.db-header-controls{display:flex;align-items:flex-end;gap:.52rem;flex-wrap:wrap}.db-control-group{display:flex;flex-direction:column;gap:.24rem}.db-control-group label{color:#91a0b3;font-size:.58rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.db-input,.db-select{min-width:116px;padding:.55rem .65rem;border:1px solid #dce4ef;border-radius:.62rem;background:#fff;color:#1c2c42;font-size:.76rem;box-shadow:0 2px 8px rgba(16,47,95,.03)}.db-input:focus,.db-select:focus{outline:0;border-color:#5d8df8;box-shadow:0 0 0 4px rgba(47,109,246,.1)}.db-apply{height:2.3rem;padding:0 1rem}.db-refresh,.db-icon-button{display:grid;place-items:center;width:2.3rem;height:2.3rem;flex:none;border:1px solid #dce4ef;border-radius:.62rem;background:#fff;color:#64748b;cursor:pointer;transition:.18s}.db-icon-button{color:var(--db-blue);font-size:1rem}.db-refresh:hover,.db-icon-button:hover{transform:translateY(-1px);border-color:#7ba3f8;background:#f5f9ff;color:#2563eb}

.db-kpi-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.7rem;margin-bottom:.85rem}.db-kpi{position:relative;display:flex;align-items:flex-start;gap:.65rem;min-height:106px;padding:.92rem .86rem 1rem;overflow:hidden;border:1px solid var(--db-line);border-radius:.9rem;background:linear-gradient(145deg,#fff,#fbfdff);box-shadow:0 6px 22px rgba(22,51,90,.06);transition:.18s}.db-kpi:before{position:absolute;inset:0 auto 0 0;width:3px;background:var(--kpi-color);content:""}.db-kpi:hover{transform:translateY(-3px);border-color:#d2dfed;box-shadow:0 12px 30px rgba(22,51,90,.1)}.db-kpi--blue{--kpi-color:#2f6df6;--kpi-soft:#edf4ff}.db-kpi--green{--kpi-color:#159b6d;--kpi-soft:#eaf8f2}.db-kpi--amber{--kpi-color:#d89b1f;--kpi-soft:#fff7df}.db-kpi--emerald{--kpi-color:#10a874;--kpi-soft:#e8fbf3}.db-kpi--dark{--kpi-color:#52677f;--kpi-soft:#eef2f7}.db-kpi--purple{--kpi-color:#8b5cf6;--kpi-soft:#f3edff}.db-kpi--orange{--kpi-color:#e97c28;--kpi-soft:#fff2e7}.db-kpi-icon{display:grid;place-items:center;width:2.35rem;height:2.35rem;flex:none;border-radius:.72rem;background:var(--kpi-soft);color:var(--kpi-color);font-size:.92rem;font-weight:900}.db-kpi-body{display:flex;min-width:0;flex-direction:column;padding-right:.5rem}.db-kpi-label{overflow:hidden;color:#8494a8;font-size:.53rem;font-weight:900;letter-spacing:.095em;text-overflow:ellipsis;white-space:nowrap}.db-kpi-value{margin:.15rem 0;color:#11233d;font-size:1.38rem;font-weight:900;letter-spacing:-.035em;line-height:1.1}.db-kpi-context{color:#96a4b5;font-size:.61rem;line-height:1.25}.db-eye{position:absolute;right:.5rem;bottom:.45rem;display:grid;place-items:center;width:1.55rem;height:1.55rem;border:0;border-radius:50%;background:#f1f5fa;color:#718198;cursor:pointer}.db-eye:hover{background:#e7efff;color:var(--db-blue);box-shadow:0 0 0 4px rgba(47,109,246,.08)}


.db-executive-grid{display:grid;grid-template-columns:1.08fr .92fr;gap:1rem;margin-bottom:1rem}.db-insight-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:1rem;margin-bottom:1rem}.db-panel{display:flex;min-width:0;flex-direction:column;overflow:hidden;border:1px solid var(--db-line);border-radius:1rem;background:#fff;box-shadow:0 6px 24px rgba(22,51,90,.055)}.db-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1rem 1.15rem .82rem;border-bottom:1px solid #edf2f7}.db-panel-head h3{margin:.1rem 0 0;color:#172a45;font-size:1rem;font-weight:850}.db-panel-meta{display:flex;justify-content:flex-end;gap:.55rem;flex-wrap:wrap}.db-meta-item,.db-panel-badge{padding:.34rem .52rem;border:1px solid #e4ebf3;border-radius:999px;background:#f6f8fb;color:#7a8ca2;font-size:.62rem}.db-meta-item b{color:#2a466a}.db-legend-inline{display:flex;align-items:center;gap:.7rem;color:#8391a5;font-size:.64rem}.db-legend-inline span{display:flex;align-items:center;gap:.3rem}.db-legend-dot{display:inline-block;width:8px;height:8px;border-radius:50%}.db-dot-blue{background:#2f6df6}.db-dot-green{background:#159b6d}
.db-conversion-dashboard{display:grid;grid-template-columns:270px 1fr;align-items:center;gap:.3rem;min-height:275px;padding:.65rem 1rem 1rem}.db-conversion-donut-wrap{display:flex;position:relative;align-items:center;justify-content:center;height:250px}.db-conversion-donut-wrap canvas{max-width:245px;max-height:245px}.db-conversion-detail{display:flex;flex-direction:column;gap:.4rem}.db-conversion-detail-row{appearance:none;display:grid;grid-template-columns:9px 1fr auto;align-items:center;gap:.5rem;width:100%;padding:.48rem .55rem;border:1px solid #edf1f6;border-radius:.7rem;background:#fbfcfe;text-align:left;cursor:pointer;transition:.16s}.db-conversion-detail-row:hover{transform:translateX(2px);border-color:#dce6f2;background:#f7faff}.db-conversion-detail-dot{width:8px;height:26px;border-radius:999px;background:var(--conv-color)}.db-conversion-detail-copy{min-width:0}.db-conversion-detail-copy strong{display:block;overflow:hidden;color:#344a67;font-size:.66rem;text-overflow:ellipsis;white-space:nowrap}.db-conversion-detail-copy small{display:block;margin-top:.12rem;color:#95a3b4;font-size:.55rem}.db-conversion-detail-metric{display:flex;align-items:baseline;gap:.4rem}.db-conversion-detail-metric b{color:#17365b;font-size:.81rem}.db-conversion-detail-metric span{color:var(--conv-color);font-size:.58rem;font-weight:900}
.db-chart-box{position:relative;min-height:275px;padding:.7rem 1rem 1rem}.db-evolution-foot{display:flex;justify-content:space-between;padding:.55rem 1.1rem .78rem;border-top:1px solid #f0f3f7;color:#8493a7;font-size:.65rem}

.db-result-table-wrap{overflow:auto;padding:.35rem .8rem .65rem}.db-result-table{width:100%;border-collapse:separate;border-spacing:0;font-size:.7rem}.db-result-table th{padding:.54rem;font-size:.55rem;font-weight:900;letter-spacing:.07em;text-align:left;text-transform:uppercase;white-space:nowrap;color:#8998aa;border-bottom:1px solid #e8eef5}.db-result-table td{padding:.6rem .54rem;border-bottom:1px solid #f0f3f7;color:#52677f}.db-result-table tbody tr:hover{background:#f8fbff}.db-result-table tfoot td{border-bottom:0;background:#fbfcfe;color:#28466a}.db-result-table .db-num{text-align:right;font-variant-numeric:tabular-nums}.db-result-table-name{display:flex;align-items:center;gap:.42rem}.db-result-link{appearance:none;padding:0;border:0;background:transparent;text-align:left;cursor:pointer}.db-result-table-name i{width:8px;height:8px;flex:none;border-radius:3px;background:var(--result-color);box-shadow:0 0 0 3px rgba(47,109,246,.08)}.db-result-table-name strong{color:#41556e;font-size:.66rem}.db-result-link:hover strong{color:var(--db-blue)}.db-result-pct{color:#314a69;font-weight:900}.db-result-mini-track{min-width:80px;height:5px;overflow:hidden;border-radius:999px;background:#edf2f7}.db-result-mini-track i{display:block;height:100%;border-radius:999px}
.db-reason-block{display:grid;grid-template-columns:minmax(170px,.55fr) minmax(260px,1.45fr);align-items:center;gap:1rem;margin:.2rem .8rem .8rem;padding:.8rem .85rem;border:1px solid #e8edf4;border-radius:.8rem;background:#f8fafc}.db-reason-block>div:first-child strong{display:block;color:#314b6a;font-size:.72rem}.db-reason-block>div:first-child small{display:block;margin-top:.2rem;color:#8b9aac;font-size:.56rem}.db-reason-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem}.db-reason-list button{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.38rem .5rem;border:1px solid #e5ebf2;border-radius:.55rem;background:#fff;color:#667b95;font-size:.58rem;text-align:left;cursor:pointer}.db-reason-list button:hover{border-color:#bcd0ec;color:var(--db-blue)}.db-reason-list button strong{color:#264566}.db-reason-empty{grid-column:1/-1;color:#8a99aa;font-size:.62rem}

.db-ranking-list{display:flex;min-height:270px;flex-direction:column;gap:.6rem;padding:.8rem .95rem 1rem}.db-rank-row{display:grid;grid-template-columns:23px 36px 1fr;align-items:center;gap:.6rem;padding:.35rem .42rem;border-radius:.78rem}.db-rank-row:hover{background:#f8fbff}.db-rank-pos{color:#a4afbc;font-size:.68rem;font-weight:900;text-align:center}.db-rank-top-1 .db-rank-pos{color:#d39b18}.db-rank-top-2 .db-rank-pos{color:#7d8fa4}.db-rank-top-3 .db-rank-pos{color:#b77b50}.db-rank-avatar,.db-gestor-avatar{display:grid;place-items:center;border-radius:10px;background:linear-gradient(135deg,#edf4ff,#dfebff);color:var(--db-blue);font-size:.61rem;font-weight:900}.db-rank-avatar{width:36px;height:36px}.db-rank-top-1 .db-rank-avatar{background:linear-gradient(135deg,#2f6df6,#7da7ff);color:#fff;box-shadow:0 7px 18px rgba(47,109,246,.2)}.db-rank-main{min-width:0}.db-rank-head,.db-rank-foot{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.db-rank-head strong{overflow:hidden;color:#304864;font-size:.68rem;text-overflow:ellipsis;white-space:nowrap}.db-rank-head b{color:#17365b;font-size:.73rem;white-space:nowrap}.db-rank-track{height:6px;margin:.3rem 0;overflow:hidden;border-radius:999px;background:#edf2f7}.db-rank-track i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#2f6df6,#80a8f8)}.db-rank-foot{color:#97a4b4;font-size:.55rem}.db-green{color:#14845d}.db-blue{color:#245fd0}.db-red{color:#b83344}

.db-panel--table{margin-top:1rem}.db-table-wrap{overflow-x:auto;padding:0 .5rem .55rem}.db-table{width:100%;border-collapse:collapse;font-size:.76rem}.db-table th{padding:.68rem .78rem;border-bottom:1px solid #e6edf5;background:#f7f9fc;color:#8a98aa;font-size:.56rem;font-weight:900;letter-spacing:.08em;text-align:left;text-transform:uppercase;white-space:nowrap}.db-table td{padding:.7rem .78rem;border-bottom:1px solid #f0f3f7;color:#52667f}.db-table tr:hover td{background:#f8fbff}.db-table .db-num{text-align:right;font-variant-numeric:tabular-nums}.db-gestor-cell{display:flex;align-items:center;gap:.5rem}.db-gestor-avatar{width:1.75rem;height:1.75rem;background:linear-gradient(135deg,#2f6df6,#6b98fb);color:#fff}.db-table-empty{padding:2rem!important;color:#91a0b2!important;text-align:center!important}

.db-detail-modal{width:min(1180px,100%);max-height:88vh;padding:1.5rem}.db-detail-head{display:flex;justify-content:space-between;gap:1rem;padding-right:2rem}.db-detail-head h2{margin:.15rem 0 .2rem;color:#132944;font-size:1.25rem}.db-detail-head p{margin:0;color:#8291a4;font-size:.75rem}.db-detail-total{align-self:center;color:#1e5dd0;font-size:1.8rem;font-weight:900}.db-detail-summary{display:flex;gap:.5rem;flex-wrap:wrap;margin:1rem 0}.db-detail-chip{padding:.42rem .62rem;border:1px solid #e5ebf3;border-radius:.62rem;background:#f5f8fc;color:#667a93;font-size:.66rem}.db-detail-chip strong{color:#17375e}.db-detail-table-wrap{max-height:52vh;overflow:auto;border:1px solid #e7edf4;border-radius:.8rem}.db-detail-table{width:100%;min-width:760px;border-collapse:collapse}.db-detail-table th{position:sticky;top:0;z-index:2;padding:.68rem .7rem;background:#f6f8fb;color:#8391a3;font-size:.57rem;letter-spacing:.07em;text-align:left;text-transform:uppercase}.db-detail-table td{padding:.66rem .7rem;border-bottom:1px solid #eef2f6;color:#4d627c;font-size:.7rem}.db-detail-table tr:hover td{background:#fbfdff}.db-detail-empty{padding:2rem!important;color:#8998aa!important;text-align:center}.db-trace-btn{min-width:88px;padding:.42rem .56rem;font-size:.62rem;white-space:nowrap}

.db-capturing .db-panel,.db-capturing .db-kpi{opacity:1!important;animation:none!important;transform:none!important;transition:none!important}.db-capturing .db-refresh,.db-capturing #dash-photo,.db-capturing .db-eye{visibility:hidden}
@keyframes dbCardIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}.db-kpi,.db-panel{animation:dbCardIn .42s both}

html[data-theme="dark"] .db-title,html[data-theme="dark"] .db-panel-head h3,html[data-theme="dark"] .db-kpi-value,html[data-theme="dark"] .db-conversion-detail-metric b,html[data-theme="dark"] .db-rank-head strong,html[data-theme="dark"] .db-rank-head b,html[data-theme="dark"] .db-detail-head h2{color:#f1f6ff}html[data-theme="dark"] .db-panel,html[data-theme="dark"] .db-kpi{border-color:#294158;background:#101f32;box-shadow:none}html[data-theme="dark"] .db-input,html[data-theme="dark"] .db-select,html[data-theme="dark"] .db-refresh,html[data-theme="dark"] .db-icon-button{border-color:#304a65;background:#12243a;color:#dfe9f6}html[data-theme="dark"] .db-conversion-detail-row,html[data-theme="dark"] .db-reason-block,html[data-theme="dark"] .db-reason-list button{border-color:#294158;background:#14263c;color:#a9bad0}html[data-theme="dark"] .db-result-table td,html[data-theme="dark"] .db-table td{border-color:#24394f;color:#aebdd0}html[data-theme="dark"] .db-result-table th,html[data-theme="dark"] .db-table th,html[data-theme="dark"] .db-detail-table th{border-color:#2a425a;background:#14263c;color:#9eafc3}html[data-theme="dark"] .db-result-table tfoot td,html[data-theme="dark"] .db-rank-row:hover,html[data-theme="dark"] .db-result-table tbody tr:hover,html[data-theme="dark"] .db-table tr:hover td{background:#13263b}html[data-theme="dark"] .db-detail-table td{border-color:#263d54;color:#afbdd0}

@media(max-width:1350px){.db-kpi-strip{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1100px){.db-executive-grid{grid-template-columns:1fr}.db-conversion-dashboard{grid-template-columns:250px 1fr}}
@media(max-width:850px){.db-header{align-items:flex-start;flex-direction:column}.db-kpi-strip{grid-template-columns:repeat(2,1fr)}.db-insight-grid{grid-template-columns:1fr}.db-reason-block{grid-template-columns:1fr}.db-header-controls{width:100%}}
@media(max-width:650px){.db-kpi-strip{grid-template-columns:1fr}.db-conversion-dashboard{grid-template-columns:1fr}.db-conversion-donut-wrap{height:215px}.db-conversion-donut-wrap canvas{max-width:210px;max-height:210px}.db-control-group{min-width:125px;flex:1}.db-input,.db-select{width:100%;min-width:0}.db-reason-list{grid-template-columns:1fr}.db-title{font-size:1.3rem}.db-panel-head{flex-direction:column}.db-legend-inline{flex-wrap:wrap}}
/* Identidad y trazabilidad por persona */
.dashboard-screen .db-identity-note{font-size:12px;color:var(--text-muted,#65758b);margin:10px 0 18px;line-height:1.6}
.db-person-credits{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}
.db-trace-copy{white-space:pre-wrap;min-width:320px;max-width:600px}
.db-detail-table td small{display:block;margin-top:5px;white-space:pre-wrap}

/* BETA 1.2.3.5.39.5 · dashboard depurado + selector calendario con formato SV */
.db-level-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:.15rem 0 .62rem;padding:.58rem .75rem;border:1px solid #e6edf5;border-radius:.82rem;background:linear-gradient(90deg,#f8fbff,#fff)}
.db-level-head>div{display:flex;align-items:center;gap:.72rem;min-width:0}.db-level-head .db-eyebrow{margin:0 0 .13rem}.db-level-head h3{margin:0;color:#18395f;font-size:.88rem}.db-level-head p{margin:.15rem 0 0;color:#8797aa;font-size:.61rem;line-height:1.4}.db-level-index{display:grid;place-items:center;width:2rem;height:2rem;flex:0 0 2rem;border-radius:.62rem;background:#eaf2ff;color:#2f6df6;font-size:.83rem;font-weight:900}.db-level-tag{padding:.34rem .5rem;border:1px solid #dce7f5;border-radius:999px;background:#fff;color:#708399;font-size:.49rem;font-weight:900;letter-spacing:.06em;white-space:nowrap}
.db-dot-teal{background:#08a9c7}.db-reason-layout{display:grid;grid-template-columns:1fr 1fr;gap:.7rem;padding:0 .8rem .8rem}.db-reason-layout .db-reason-block{grid-template-columns:1fr;margin:0;align-items:start}.db-reason-layout .db-reason-list{grid-template-columns:1fr 1fr}.db-panel--results{margin-bottom:1rem}
.db-date-control{position:relative;display:inline-block;min-width:132px;max-width:100%}.db-date-control>.db-input{width:100%;padding-right:2.25rem}.db-date-picker{position:absolute;top:50%;right:.42rem;display:grid;place-items:center;width:1.7rem;height:1.7rem;padding:0;transform:translateY(-50%);border:0;border-radius:.45rem;background:transparent;color:#71849a;cursor:pointer;transition:.16s}.db-date-picker:hover{background:#edf4ff;color:#2f6df6}.db-date-picker:focus-visible{outline:2px solid rgba(47,109,246,.38);outline-offset:1px}.db-date-native{position:absolute!important;right:.5rem;bottom:.2rem;width:1px!important;height:1px!important;min-width:0!important;padding:0!important;border:0!important;opacity:0!important;pointer-events:none!important}
html[data-theme="dark"] .db-level-head{background:#101f32;border-color:#294158}html[data-theme="dark"] .db-level-head h3{color:#eef5ff}html[data-theme="dark"] .db-level-head p{color:#9cafc4}html[data-theme="dark"] .db-level-tag{background:#14263c;border-color:#304a65;color:#aac0d7}html[data-theme="dark"] .db-date-picker{color:#9fb2c8}html[data-theme="dark"] .db-date-picker:hover{background:#1a3350;color:#9cc0ff}
@media(max-width:1250px){.db-reason-layout{grid-template-columns:1fr}}
@media(max-width:850px){.db-level-head{align-items:flex-start}.db-level-tag{display:none}.db-reason-layout .db-reason-list{grid-template-columns:1fr}.db-date-control{width:100%}}
@media(max-width:520px){.db-level-head>div{align-items:flex-start}.db-level-index{margin-top:.05rem}}

/* BETA 1.2.3.5.39.6 · relectura del período, distinción rango vs día y redistribución visual */
.db-scope-banner{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(280px,.95fr);gap:1rem;align-items:stretch;padding:1rem 1.05rem;margin:.2rem 0 .95rem;background:linear-gradient(135deg,#f8fbff 0%,#ffffff 48%,#edf5ff 100%)}
.db-scope-copy h3{margin:.12rem 0 .38rem;color:#17365b;font-size:1.02rem}.db-scope-copy p{margin:0;color:#76879b;font-size:.72rem;line-height:1.55}
.db-scope-chips{display:flex;flex-wrap:wrap;gap:.45rem;margin:.78rem 0 .7rem}.db-scope-chip{display:inline-flex;align-items:center;gap:.3rem;padding:.38rem .62rem;border:1px solid #dce7f5;border-radius:999px;background:#fff;color:#5e748f;font-size:.62rem;font-weight:800}.db-scope-chip--primary{background:#eff5ff;color:#245fd0;border-color:#cfe0ff}
.db-scope-summary{padding:.72rem .82rem;border:1px solid #e3edf8;border-radius:.82rem;background:rgba(255,255,255,.82);color:#4c637f;font-size:.72rem}
.db-scope-side{display:flex;flex-direction:column;gap:.8rem}.db-inline-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem}.db-inline-stat{padding:.76rem .8rem;border:1px solid #e5eef8;border-radius:.92rem;background:#fff;box-shadow:0 12px 28px rgba(47,109,246,.06)}.db-inline-stat span{display:block;color:#7d8fa4;font-size:.58rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.db-inline-stat strong{display:block;margin:.3rem 0 .18rem;color:#17365b;font-size:1.05rem;font-weight:900}.db-inline-stat small{display:block;color:#8a99ab;font-size:.61rem;line-height:1.35}
.db-scope-illustration{display:grid;place-items:center;min-height:124px;padding:.3rem .8rem;border:1px solid #e5eef8;border-radius:1rem;background:radial-gradient(circle at 50% 35%,rgba(97,149,255,.16),transparent 54%),linear-gradient(180deg,#ffffff,#f5f9ff)}.db-scope-illustration img{max-width:150px;width:100%;height:auto;object-fit:contain;filter:drop-shadow(0 16px 24px rgba(47,109,246,.12))}

.db-level-head--work{margin-top:.15rem}.db-kpi-strip--work{grid-template-columns:repeat(5,minmax(0,1fr));margin-bottom:.35rem}.db-kpi--work .db-kpi-context{min-height:2.1em}.db-work-note{margin-top:.3rem}

.db-story-grid,.db-reasons-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:1rem}.db-panel--workmix,.db-panel--reasons{overflow:hidden}.db-panel--workmix{min-height:100%}
.db-workmix-layout{display:grid;grid-template-columns:minmax(220px,255px) 1fr;gap:.9rem;align-items:center;padding:.25rem .85rem .9rem}.db-workmix-chart{position:relative;height:255px;padding:.25rem 0}.db-workmix-summary{display:flex;flex-direction:column;gap:.5rem}.db-workmix-row{display:flex;align-items:flex-start;justify-content:space-between;gap:.65rem;padding:.65rem .72rem;border:1px solid #e6edf5;border-radius:.8rem;background:#fbfdff}.db-workmix-copy{display:flex;gap:.55rem;align-items:flex-start;min-width:0}.db-workmix-copy strong{display:block;color:#17365b;font-size:.7rem}.db-workmix-copy small{display:block;margin-top:.12rem;color:#8798ab;font-size:.6rem;line-height:1.4}.db-workmix-metric{text-align:right;white-space:nowrap}.db-workmix-metric b{display:block;color:#17365b;font-size:.86rem}.db-workmix-metric span{display:block;margin-top:.16rem;color:#7d90a7;font-size:.61rem}.db-workmix-dot{display:inline-block;width:.74rem;height:.74rem;margin-top:.18rem;flex:0 0 .74rem;border-radius:999px;background:var(--workmix-color,#2f6df6)}.db-workmix-empty{padding:1rem;border:1px dashed #dce7f5;border-radius:.85rem;color:#8594a7;font-size:.68rem;text-align:center}

.db-panel--reasons .db-reason-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem;padding:.1rem .85rem .95rem}.db-panel--reasons .db-reason-list button{padding:.52rem .68rem;border-radius:.72rem;font-size:.64rem;box-shadow:none}.db-panel--reasons .db-reason-list button span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.db-panel--reasons .db-reason-empty{padding:0 .85rem .95rem}

.db-panel--results .db-result-table-wrap{padding-bottom:.78rem}.db-panel--results .db-result-table{font-size:.74rem}.db-panel--results .db-panel-head,.db-panel--workmix .db-panel-head,.db-panel--reasons .db-panel-head{padding-bottom:.15rem}
.db-panel--evolution .db-legend-inline{padding:0 .9rem .1rem}

html[data-theme="dark"] .db-scope-banner{background:linear-gradient(135deg,#112439 0%,#0e1f32 58%,#132a42 100%)}html[data-theme="dark"] .db-scope-copy h3,html[data-theme="dark"] .db-inline-stat strong,html[data-theme="dark"] .db-workmix-copy strong,html[data-theme="dark"] .db-workmix-metric b{color:#eef5ff}html[data-theme="dark"] .db-scope-copy p,html[data-theme="dark"] .db-scope-summary,html[data-theme="dark"] .db-inline-stat small,html[data-theme="dark"] .db-workmix-copy small,html[data-theme="dark"] .db-workmix-metric span{color:#aab9cc}html[data-theme="dark"] .db-scope-chip{background:#14263c;border-color:#304a65;color:#b9cade}html[data-theme="dark"] .db-scope-chip--primary{background:#173152;border-color:#31527a;color:#9fc2ff}html[data-theme="dark"] .db-scope-summary,html[data-theme="dark"] .db-inline-stat,html[data-theme="dark"] .db-scope-illustration,html[data-theme="dark"] .db-workmix-row,html[data-theme="dark"] .db-workmix-empty{background:#12243a;border-color:#294158}html[data-theme="dark"] .db-inline-stat span{color:#8ea2b9}

@media(max-width:1320px){.db-inline-stats{grid-template-columns:1fr}.db-story-grid{grid-template-columns:1.3fr 1fr}}
@media(max-width:1180px){.db-scope-banner,.db-story-grid,.db-reasons-grid{grid-template-columns:1fr}.db-workmix-layout{grid-template-columns:240px 1fr}.db-kpi-strip--work{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.db-workmix-layout{grid-template-columns:1fr}.db-workmix-chart{height:235px}.db-kpi-strip--work{grid-template-columns:repeat(2,minmax(0,1fr))}.db-panel--reasons .db-reason-list{grid-template-columns:1fr}}
@media(max-width:650px){.db-inline-stats{grid-template-columns:1fr}.db-kpi-strip--work{grid-template-columns:1fr}.db-scope-banner{padding:.9rem}.db-scope-summary{font-size:.68rem}.db-workmix-row{flex-direction:column;align-items:flex-start}.db-workmix-metric{text-align:left}.db-panel--reasons .db-reason-list{padding-left:.72rem;padding-right:.72rem}}

/* BETA 1.2.3.5.39.7 · depuración visual de cabeceras y resumen redundante */
.dashboard-screen .db-header{margin-bottom:.75rem;padding-bottom:.85rem}
.db-section-label{display:flex;align-items:center;gap:.48rem;margin:.05rem 0 .48rem;padding:0 .12rem;color:#2f6df6;font-weight:900;letter-spacing:.11em;text-transform:uppercase}
.db-section-label span{font-size:.63rem}.db-section-label small{position:relative;padding-left:.6rem;color:#8a99ac;font-size:.56rem;font-weight:800;letter-spacing:.035em;text-transform:none}.db-section-label small:before{position:absolute;left:.12rem;top:50%;width:3px;height:3px;transform:translateY(-50%);border-radius:50%;background:#b8c5d4;content:""}
.db-section-label--clients{margin-top:.82rem;color:#159b6d}
.db-kpi-strip--work{margin-bottom:0}.db-kpi-strip--clients{margin-bottom:.55rem}
.dashboard-screen .db-identity-note{margin:.15rem 0 .75rem;padding:.48rem .65rem;border-left:3px solid #dbe7f5;border-radius:.35rem;background:#f9fbfd;font-size:.65rem;line-height:1.45}
html[data-theme="dark"] .db-section-label{color:#78a5ff}html[data-theme="dark"] .db-section-label--clients{color:#5bd6a8}html[data-theme="dark"] .dashboard-screen .db-identity-note{background:#112237;border-left-color:#294158;color:#a8b9cc}
@media(max-width:650px){.db-section-label{align-items:flex-start;flex-direction:column;gap:.15rem}.db-section-label small{padding-left:0}.db-section-label small:before{display:none}}

/* BETA 1.2.3.5.39.8 · depuración superior y simetría de paneles */
.db-panel--results{margin-bottom:0!important}
.db-story-grid{align-items:stretch;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}
.db-story-grid>.db-panel{height:100%;display:flex;flex-direction:column}
.db-panel--results .db-panel-head,
.db-panel--workmix .db-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.85rem;min-height:96px;padding-bottom:.35rem}
.db-panel--results .db-panel-head>div,
.db-panel--workmix .db-panel-head>div{max-width:100%}
.db-panel--results .db-panel-subtitle,
.db-panel--workmix .db-panel-subtitle{max-width:64ch;min-height:2.8em}
.db-panel--results .db-result-table-wrap{flex:1;display:flex;flex-direction:column}
.db-panel--results .db-result-table{height:100%}
.db-panel--workmix .db-workmix-layout{flex:1;align-items:center;min-height:336px}
.db-panel--workmix .db-workmix-chart{height:280px}
.db-panel--workmix .db-workmix-summary{justify-content:center;height:100%}
.db-panel-badge{align-self:flex-start;white-space:nowrap}

@media(max-width:1180px){
  .db-panel--results .db-panel-head,
  .db-panel--workmix .db-panel-head{min-height:auto}
  .db-panel--results .db-panel-subtitle,
  .db-panel--workmix .db-panel-subtitle{min-height:auto}
  .db-panel--workmix .db-workmix-layout{min-height:auto}
}

/* BETA 1.2.3.5.39.9 · refinamiento estructural y representación dashboard */
.dashboard-screen .db-header{margin-bottom:.65rem}
.dashboard-screen .db-subtitle{max-width:72ch}

.db-overview-bar{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,.95fr);gap:.9rem;align-items:stretch;padding:.8rem .9rem;margin:.15rem 0 .75rem;background:linear-gradient(180deg,#fbfdff,#f6f9fd)}
.db-overview-main{display:flex;flex-wrap:wrap;gap:.45rem;align-content:flex-start}.db-overview-pill{display:inline-flex;align-items:center;padding:.36rem .62rem;border:1px solid #dce7f5;border-radius:999px;background:#fff;color:#69809b;font-size:.61rem;font-weight:800;letter-spacing:.03em}.db-overview-pill--primary{background:#eff5ff;color:#2f6df6;border-color:#d2e0fb}.db-overview-summary{flex:1 1 100%;margin:.08rem 0 0;padding:.72rem .78rem;border:1px solid #e3edf8;border-radius:.8rem;background:#fff;color:#47607d;font-size:.7rem;line-height:1.55}
.db-overview-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem}.db-overview-stat{padding:.72rem .78rem;border:1px solid #e3edf8;border-radius:.88rem;background:#fff;box-shadow:0 10px 24px rgba(22,53,93,.05)}.db-overview-stat span{display:block;color:#7f91a7;font-size:.56rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.db-overview-stat strong{display:block;margin:.26rem 0 .16rem;color:#17365b;font-size:1rem;font-weight:900}.db-overview-stat small{display:block;color:#8a9aab;font-size:.6rem;line-height:1.35}

.db-section-label{margin:.1rem 0 .42rem;padding:0 .06rem}.db-section-label--clients{margin-top:.25rem}
.db-kpi-strip--clients{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:.78rem}.db-kpi-strip--clients>.db-kpi:nth-child(1),.db-kpi-strip--clients>.db-kpi:nth-child(2),.db-kpi-strip--clients>.db-kpi:nth-child(3),.db-kpi-strip--clients>.db-kpi:nth-child(4){grid-column:span 3}.db-kpi-strip--clients>.db-kpi:nth-child(5),.db-kpi-strip--clients>.db-kpi:nth-child(6),.db-kpi-strip--clients>.db-kpi:nth-child(7){grid-column:span 4}.db-kpi-strip--clients .db-kpi-context{min-height:2.25em}

.db-client-insights{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.7rem;margin:.25rem 0 .5rem}.db-client-insight{padding:.72rem .78rem;border:1px solid #e4edf7;border-radius:.88rem;background:linear-gradient(180deg,#ffffff,#f8fbff)}.db-client-insight span{display:block;color:#7a8da2;font-size:.58rem;font-weight:800;letter-spacing:.035em;text-transform:uppercase}.db-client-insight strong{display:block;margin:.26rem 0 .15rem;color:#17365b;font-size:.96rem;font-weight:900}.db-client-insight small{display:block;color:#8a9aad;font-size:.6rem;line-height:1.35}
.dashboard-screen .db-identity-note{margin:.08rem 0 .88rem;padding:.56rem .72rem;border-left:3px solid #dbe7f5;border-radius:.55rem;background:#f9fbfd;font-size:.65rem;line-height:1.45}

.db-executive-grid{align-items:stretch;grid-template-columns:minmax(0,1.04fr) minmax(0,.96fr);gap:1rem}.db-executive-grid>.db-panel,.db-story-grid>.db-panel,.db-reasons-grid>.db-panel{height:100%}
.db-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.9rem}.db-panel-head>div{min-width:0}.db-panel-subtitle{max-width:64ch}
.db-panel--funnel .db-panel-head,.db-panel--evolution .db-panel-head,.db-panel--results .db-panel-head,.db-panel--workmix .db-panel-head,.db-panel--reasons .db-panel-head{min-height:94px}
.db-panel--results .db-result-table-wrap{padding-top:.15rem}
.db-panel--results .db-result-table th,.db-panel--results .db-result-table td{padding-top:.72rem;padding-bottom:.72rem}
.db-panel--workmix .db-workmix-layout{min-height:328px;grid-template-columns:minmax(230px,255px) 1fr;padding-top:.45rem}.db-panel--workmix .db-workmix-chart{height:258px}.db-panel--workmix .db-workmix-summary{gap:.55rem}
.db-reasons-grid{grid-template-columns:1fr 1fr;gap:1rem}.db-panel--reasons .db-panel-head{min-height:102px}.db-panel--reasons .db-reason-list{padding-top:.18rem}

html[data-theme="dark"] .db-overview-bar{background:linear-gradient(180deg,#102033,#0f2136)}html[data-theme="dark"] .db-overview-pill{background:#13253b;border-color:#2b4259;color:#adc0d6}html[data-theme="dark"] .db-overview-pill--primary{background:#173152;border-color:#31527a;color:#9fc2ff}html[data-theme="dark"] .db-overview-summary,html[data-theme="dark"] .db-overview-stat,html[data-theme="dark"] .db-client-insight,html[data-theme="dark"] .dashboard-screen .db-identity-note{background:#12243a;border-color:#294158;color:#a8b9cc}html[data-theme="dark"] .db-overview-stat strong,html[data-theme="dark"] .db-client-insight strong{color:#eef5ff}html[data-theme="dark"] .db-overview-stat span,html[data-theme="dark"] .db-client-insight span{color:#8ea2b9}html[data-theme="dark"] .db-overview-stat small,html[data-theme="dark"] .db-client-insight small{color:#a7b9cc}

@media(max-width:1320px){.db-overview-bar{grid-template-columns:1fr}.db-overview-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.db-kpi-strip--clients>.db-kpi:nth-child(1),.db-kpi-strip--clients>.db-kpi:nth-child(2),.db-kpi-strip--clients>.db-kpi:nth-child(3),.db-kpi-strip--clients>.db-kpi:nth-child(4),.db-kpi-strip--clients>.db-kpi:nth-child(5),.db-kpi-strip--clients>.db-kpi:nth-child(6),.db-kpi-strip--clients>.db-kpi:nth-child(7){grid-column:span 6}.db-client-insights{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1180px){.db-executive-grid,.db-story-grid,.db-reasons-grid{grid-template-columns:1fr}.db-panel--funnel .db-panel-head,.db-panel--evolution .db-panel-head,.db-panel--results .db-panel-head,.db-panel--workmix .db-panel-head,.db-panel--reasons .db-panel-head{min-height:auto}.db-panel--workmix .db-workmix-layout{min-height:auto}}
@media(max-width:900px){.db-overview-stats{grid-template-columns:1fr}.db-kpi-strip--clients>.db-kpi:nth-child(1),.db-kpi-strip--clients>.db-kpi:nth-child(2),.db-kpi-strip--clients>.db-kpi:nth-child(3),.db-kpi-strip--clients>.db-kpi:nth-child(4),.db-kpi-strip--clients>.db-kpi:nth-child(5),.db-kpi-strip--clients>.db-kpi:nth-child(6),.db-kpi-strip--clients>.db-kpi:nth-child(7){grid-column:span 12}.db-client-insights{grid-template-columns:1fr}.db-panel--workmix .db-workmix-layout{grid-template-columns:1fr}.db-panel--workmix .db-workmix-chart{height:240px}}

/* BETA 1.2.3.5.40.0 · dashboard por bloques fijo/dinámico + filtros pulidos */
.dashboard-screen .db-header{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(430px,.9fr);gap:1rem;align-items:end}
.dashboard-screen .db-header-text{padding-bottom:.18rem}.dashboard-screen .db-subtitle{max-width:68ch;line-height:1.48}
.dashboard-screen .db-header-controls{display:flex;align-items:flex-end;justify-content:flex-end;gap:.75rem;flex-wrap:nowrap}
.dashboard-screen .db-filter-panel{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.72rem;flex:1;padding:.82rem .9rem;border:1px solid #e3ebf5;border-radius:1rem;background:linear-gradient(180deg,#ffffff,#f8fbff);box-shadow:0 10px 28px rgba(27,55,93,.06)}
.dashboard-screen .db-control-group{min-width:0}.dashboard-screen .db-control-group label{margin-left:.12rem;color:#7f91a7;font-size:.56rem;letter-spacing:.07em}.dashboard-screen .db-input,.dashboard-screen .db-select{min-width:0;width:100%;height:2.5rem;border-radius:.8rem;border-color:#dbe6f2;background:#fff;box-shadow:0 4px 14px rgba(15,35,70,.03)}
.dashboard-screen .db-input:hover,.dashboard-screen .db-select:hover,.dashboard-screen .db-date-picker:hover{border-color:#b8cbec}.dashboard-screen .db-filter-actions{display:flex;align-items:center;gap:.55rem;flex:none}.dashboard-screen .db-apply{height:2.5rem;padding:0 1.15rem;border-radius:.82rem}.dashboard-screen .db-refresh,.dashboard-screen .db-icon-button{width:2.5rem;height:2.5rem;border-radius:.82rem}
.dashboard-screen .db-photo-button{padding:0;overflow:hidden}.dashboard-screen .db-photo-button img{width:1.12rem;height:1.12rem;object-fit:contain;display:block;opacity:.92}.dashboard-screen .db-photo-button.is-loading img{opacity:.3}.dashboard-screen .db-photo-button.is-loading::after{content:'…';position:absolute;color:#2f6df6;font-weight:900;font-size:.95rem}

.dashboard-screen .db-overview-bar{margin-top:.08rem;margin-bottom:.78rem}.dashboard-screen .db-overview-summary{min-height:72px}
.dashboard-screen .db-section-label--dynamic{margin-top:1.05rem;margin-bottom:.45rem;padding-top:.2rem;border-top:1px dashed #dbe5f1}
.dashboard-screen .db-client-insights small:last-child{min-height:1.4em}
.dashboard-screen .db-executive-grid--fixed{grid-template-columns:minmax(0,1.03fr) minmax(0,.97fr);margin-bottom:1.12rem}
.dashboard-screen .db-story-grid--dynamic{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);margin-bottom:1.28rem}
.dashboard-screen .db-reasons-grid{margin-top:1.3rem;gap:1.15rem}

.dashboard-screen .db-panel--funnel .db-conversion-dashboard{grid-template-columns:240px 1fr;align-items:center}.dashboard-screen .db-panel--funnel .db-conversion-donut-wrap{height:255px}.dashboard-screen .db-panel--funnel .db-conversion-detail{padding-right:.82rem}
.dashboard-screen .db-panel--results .db-result-table{font-size:.72rem}.dashboard-screen .db-panel--results .db-panel-subtitle{max-width:52ch}.dashboard-screen .db-panel--results .db-result-table th:first-child,.dashboard-screen .db-panel--results .db-result-table td:first-child{width:44%}
.dashboard-screen .db-panel--evolution .db-chart-box{height:320px;padding:0 .95rem .85rem}.dashboard-screen .db-panel--evolution .db-legend-inline{padding:0 1.1rem .22rem}
.dashboard-screen .db-panel--workmix .db-workmix-layout{grid-template-columns:minmax(220px,250px) 1fr;align-items:center}.dashboard-screen .db-panel--workmix .db-workmix-chart{height:250px}
.dashboard-screen .db-panel--reasons .db-panel-subtitle{max-width:56ch}.dashboard-screen .db-panel--reasons .db-reason-list{padding:.05rem .95rem .95rem}

html[data-theme="dark"] .dashboard-screen .db-filter-panel{background:linear-gradient(180deg,#102134,#102134);border-color:#2a4158;box-shadow:none}html[data-theme="dark"] .dashboard-screen .db-input,html[data-theme="dark"] .dashboard-screen .db-select{border-color:#324b66;background:#13263c}html[data-theme="dark"] .dashboard-screen .db-section-label--dynamic{border-top-color:#2a4259}

@media(max-width:1380px){.dashboard-screen .db-header{grid-template-columns:1fr}.dashboard-screen .db-header-controls{justify-content:stretch}.dashboard-screen .db-filter-panel{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-screen .db-header-controls{flex-wrap:wrap}.dashboard-screen .db-filter-panel{width:100%}}
@media(max-width:1180px){.dashboard-screen .db-executive-grid--fixed,.dashboard-screen .db-story-grid--dynamic,.dashboard-screen .db-reasons-grid{grid-template-columns:1fr}.dashboard-screen .db-panel--results .db-result-table th:first-child,.dashboard-screen .db-panel--results .db-result-table td:first-child{width:auto}}
@media(max-width:760px){.dashboard-screen .db-filter-panel{grid-template-columns:1fr}.dashboard-screen .db-filter-actions{width:100%;justify-content:flex-start}.dashboard-screen .db-header-controls{align-items:stretch}.dashboard-screen .db-panel--funnel .db-conversion-dashboard,.dashboard-screen .db-panel--workmix .db-workmix-layout{grid-template-columns:1fr}}
.dashboard-screen .db-icon-button{position:relative}

/* BETA 1.2.3.5.40.1 · corrección UX solicitada: sin bloques añadidos, KPIs en una fila y filtros ordenados */
.dashboard-screen .db-header{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:.72rem!important;
  margin-bottom:.72rem!important;
}
.dashboard-screen .db-header-text{padding:0!important}
.dashboard-screen .db-header-controls{
  width:100%!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:end!important;
  gap:.72rem!important;
  padding:.72rem .8rem!important;
  border:1px solid #e1e9f3!important;
  border-radius:1rem!important;
  background:#fff!important;
  box-shadow:0 5px 18px rgba(22,51,90,.045)!important;
}
.dashboard-screen .db-filter-panel{
  width:100%!important;
  display:grid!important;
  grid-template-columns:minmax(180px,1.35fr) minmax(145px,.9fr) minmax(145px,.9fr) minmax(170px,1.05fr)!important;
  gap:.68rem!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.dashboard-screen .db-filter-actions{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:flex-end!important;
  gap:.5rem!important;
  padding-bottom:0!important;
}
.dashboard-screen .db-control-group{gap:.3rem!important;min-width:0!important}
.dashboard-screen .db-control-group label{
  margin:0 0 0 .08rem!important;
  color:#72869f!important;
  font-size:.56rem!important;
  font-weight:900!important;
  letter-spacing:.075em!important;
}
.dashboard-screen .db-input,.dashboard-screen .db-select{
  width:100%!important;
  min-width:0!important;
  height:2.45rem!important;
  padding:.55rem .7rem!important;
  border-radius:.72rem!important;
  background:#fff!important;
}
.dashboard-screen .db-date-control{width:100%!important}
.dashboard-screen .db-apply{height:2.45rem!important;border-radius:.72rem!important;padding:0 1.05rem!important}
.dashboard-screen .db-refresh,.dashboard-screen .db-icon-button{width:2.45rem!important;height:2.45rem!important;border-radius:.72rem!important}

/* Los siete KPIs vuelven a ser una sola fila en escritorio, como antes. */
.dashboard-screen .db-kpi-strip--clients{
  display:grid!important;
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:.65rem!important;
  margin-bottom:.78rem!important;
}
.dashboard-screen .db-kpi-strip--clients>.db-kpi{
  grid-column:auto!important;
  min-width:0!important;
}
.dashboard-screen .db-kpi-strip--clients .db-kpi{
  padding:.72rem .64rem!important;
}
.dashboard-screen .db-kpi-strip--clients .db-kpi-icon{
  width:2.1rem!important;
  height:2.1rem!important;
  flex:0 0 2.1rem!important;
}
.dashboard-screen .db-kpi-strip--clients .db-kpi-label{font-size:.53rem!important}
.dashboard-screen .db-kpi-strip--clients .db-kpi-value{font-size:1.18rem!important}
.dashboard-screen .db-kpi-strip--clients .db-kpi-context{font-size:.57rem!important;min-height:2.15em!important}

/* Ajuste de respiración después de retirar los bloques no solicitados. */
.dashboard-screen .db-section-label--clients{margin-top:.08rem!important;margin-bottom:.42rem!important}
.dashboard-screen .db-executive-grid--fixed{margin-top:0!important}

html[data-theme="dark"] .dashboard-screen .db-header-controls{
  background:#101f32!important;
  border-color:#294158!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .dashboard-screen .db-filter-panel{background:transparent!important}

@media(max-width:1450px){
  .dashboard-screen .db-filter-panel{
    grid-template-columns:minmax(170px,1.3fr) minmax(135px,.9fr) minmax(135px,.9fr) minmax(155px,1fr)!important;
  }
  .dashboard-screen .db-kpi-strip--clients{gap:.5rem!important}
  .dashboard-screen .db-kpi-strip--clients .db-kpi{padding:.65rem .55rem!important}
  .dashboard-screen .db-kpi-strip--clients .db-kpi-icon{width:1.9rem!important;height:1.9rem!important;flex-basis:1.9rem!important}
  .dashboard-screen .db-kpi-strip--clients .db-kpi-value{font-size:1.08rem!important}
}
@media(max-width:1120px){
  .dashboard-screen .db-header-controls{grid-template-columns:1fr!important}
  .dashboard-screen .db-filter-panel{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .dashboard-screen .db-filter-actions{justify-content:flex-start!important}
  .dashboard-screen .db-kpi-strip--clients{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(max-width:760px){
  .dashboard-screen .db-filter-panel{grid-template-columns:1fr!important}
  .dashboard-screen .db-kpi-strip--clients{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:520px){
  .dashboard-screen .db-kpi-strip--clients{grid-template-columns:1fr!important}
}

/* BETA 1.2.3.5.40.2 · detalle aperturable trabajo del período */
.db-workmix-row{width:100%;text-align:left;cursor:pointer;transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease,background .14s ease}
.db-workmix-row:hover{transform:translateY(-1px);border-color:#cddcf1;background:#fff;box-shadow:0 8px 20px rgba(20,45,80,.06)}
.db-workmix-row:focus-visible{outline:2px solid #2f6df6;outline-offset:2px}
.db-workmix-row .db-workmix-dot{background:var(--workmix-color,#2f6df6)}
html[data-theme="dark"] .db-workmix-row:hover{background:#162b43;border-color:#3a5876;box-shadow:none}

/* BETA 1.2.3.5.40.3 · anillos con más presencia + historia centrada en Y */
.dashboard-screen .db-panel--funnel .db-conversion-dashboard{
  grid-template-columns:275px minmax(0,1fr);
  min-height:330px;
  padding:1.35rem 1rem 1.15rem;
  align-items:center;
}
.dashboard-screen .db-panel--funnel .db-conversion-donut-wrap{
  height:292px;
}
.dashboard-screen .db-panel--funnel .db-conversion-donut-wrap canvas{
  max-width:280px;
  max-height:280px;
}
.dashboard-screen .db-panel--funnel .db-conversion-detail{
  padding:.55rem .85rem .25rem 0;
  gap:.48rem;
}
.dashboard-screen .db-panel--funnel .db-conversion-detail-row{
  padding:.56rem .62rem;
  border-radius:.78rem;
}
.dashboard-screen .db-panel--funnel .db-conversion-detail-dot{
  width:9px;
  height:30px;
}
.dashboard-screen .db-panel--funnel .db-conversion-detail-copy strong{font-size:.69rem}
.dashboard-screen .db-panel--funnel .db-conversion-detail-metric b{font-size:.86rem}

.dashboard-screen .db-panel--workmix .db-workmix-layout{
  grid-template-columns:minmax(245px,280px) minmax(0,1fr);
  min-height:360px;
  padding:.75rem .95rem 1rem;
}
.dashboard-screen .db-panel--workmix .db-workmix-chart{
  height:292px;
}
.dashboard-screen .db-panel--workmix .db-workmix-chart canvas{
  max-width:282px;
  max-height:282px;
}
.dashboard-screen .db-workmix-row{
  border-left:4px solid var(--workmix-color,#2F6DF6);
}

@media(max-width:1180px){
  .dashboard-screen .db-panel--funnel .db-conversion-dashboard{grid-template-columns:265px 1fr}
}
@media(max-width:760px){
  .dashboard-screen .db-panel--funnel .db-conversion-dashboard,
  .dashboard-screen .db-panel--workmix .db-workmix-layout{grid-template-columns:1fr}
  .dashboard-screen .db-panel--funnel .db-conversion-donut-wrap,
  .dashboard-screen .db-panel--workmix .db-workmix-chart{height:260px}
}

/* BETA 1.2.3.5.40.4 · modales sobre navbar + observaciones compactas y expandibles */
#dashboard-detail-modal,
#dashboard-person-modal{
  z-index:6100!important;
}
#dashboard-comment-modal{
  z-index:6200!important;
}
#dashboard-detail-modal .db-detail-modal,
#dashboard-person-modal .db-detail-modal{
  max-height:calc(100vh - 36px);
}

.db-detail-table tbody tr{
  height:62px;
}
.db-detail-table td{
  vertical-align:middle;
}
.db-observation-cell,
.db-trace-copy{
  width:220px;
  min-width:180px;
  max-width:240px;
  padding-top:.42rem!important;
  padding-bottom:.42rem!important;
}
.db-observation-preview{
  display:-webkit-box;
  width:100%;
  max-width:100%;
  max-height:2.9em;
  padding:0;
  overflow:hidden;
  border:0;
  background:transparent;
  color:#405a77;
  font:inherit;
  line-height:1.42;
  text-align:left;
  text-overflow:ellipsis;
  cursor:pointer;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  line-clamp:2;
}
.db-observation-preview:hover{
  color:#245fc7;
  text-decoration:underline;
  text-underline-offset:2px;
}
.db-observation-preview:focus-visible{
  outline:2px solid #2f6df6;
  outline-offset:3px;
  border-radius:4px;
}
.db-comment-modal-card{
  width:min(680px,100%);
  max-height:min(72vh,620px);
  padding:1.45rem 1.55rem 1.55rem;
}
.db-comment-modal-card h2{
  margin:.25rem 2.2rem 1rem 0;
  color:#17365b;
  font-size:1.15rem;
}
.db-comment-full{
  max-height:46vh;
  overflow:auto;
  padding:1rem 1.05rem;
  border:1px solid #e1eaf4;
  border-radius:.9rem;
  background:#f8fbff;
  color:#304c6d;
  font-size:.82rem;
  line-height:1.65;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
html[data-theme="dark"] .db-observation-preview{color:#b5c7dc}
html[data-theme="dark"] .db-observation-preview:hover{color:#7eb2ff}
html[data-theme="dark"] .db-comment-modal-card h2{color:#eef5ff}
html[data-theme="dark"] .db-comment-full{border-color:#2b455f;background:#11243a;color:#c5d3e3}

@media(max-width:760px){
  #dashboard-detail-modal,
  #dashboard-person-modal,
  #dashboard-comment-modal{padding:10px!important}
  #dashboard-detail-modal .db-detail-modal,
  #dashboard-person-modal .db-detail-modal{max-height:calc(100vh - 20px)}
  .db-observation-cell,.db-trace-copy{min-width:160px;width:180px;max-width:190px}
}

/* BETA 1.2.3.5.40.5 · dark modal polish + modal Excel export */
.db-modal-top-actions{
  position:absolute;
  top:14px;
  right:14px;
  z-index:8;
  display:flex;
  align-items:center;
  gap:.48rem;
}
.db-modal-top-actions .modal-close{
  position:static;
  inset:auto;
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  padding:0;
  border:1px solid #dce6f1;
  border-radius:50%;
  background:#f4f7fb;
  color:#52677f;
  font-size:20px;
  line-height:1;
  cursor:pointer;
  transition:.15s ease;
}
.db-modal-top-actions .modal-close:hover{transform:translateY(-1px);background:#eaf1f9;color:#17365b;border-color:#c5d5e7}
.db-modal-export{
  position:relative;
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  padding:6px;
  border:1px solid #cfe2d8;
  border-radius:11px;
  background:#eef8f2;
  cursor:pointer;
  transition:.15s ease;
}
.db-modal-export img{display:block;width:22px;height:22px;object-fit:contain}
.db-modal-export:hover{transform:translateY(-1px);border-color:#8fc1a5;background:#e2f4e9;box-shadow:0 7px 18px rgba(24,112,67,.12)}
.db-modal-export:focus-visible{outline:2px solid #18864f;outline-offset:2px}
.db-modal-export:disabled{cursor:wait;opacity:.55;transform:none;box-shadow:none}
.db-modal-export::after{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:20;
  width:max-content;
  max-width:210px;
  padding:.4rem .55rem;
  border-radius:.48rem;
  background:#132944;
  color:#fff;
  font-size:.58rem;
  font-weight:800;
  letter-spacing:.02em;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  transform:translateY(-3px);
  transition:.14s ease;
  content:attr(data-tooltip);
  box-shadow:0 8px 22px rgba(6,24,46,.2);
}
.db-modal-export:hover::after,.db-modal-export:focus-visible::after{opacity:1;transform:translateY(0)}
#dashboard-detail-modal .db-detail-head{padding-right:5.6rem}
#dashboard-person-modal .db-detail-modal>h2,
#dashboard-comment-modal .db-comment-modal-card>h2{padding-right:5.6rem}

html[data-theme="dark"] #dashboard-detail-modal,
html[data-theme="dark"] #dashboard-person-modal,
html[data-theme="dark"] #dashboard-comment-modal{
  background:rgba(2,12,24,.72)!important;
  backdrop-filter:blur(7px)!important;
}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-modal,
html[data-theme="dark"] #dashboard-person-modal .db-detail-modal,
html[data-theme="dark"] #dashboard-comment-modal .db-comment-modal-card{
  background:#0f1f33!important;
  color:#eef5ff!important;
  border:1px solid #29455f!important;
  box-shadow:0 30px 90px rgba(0,0,0,.48),0 0 0 1px rgba(255,255,255,.025)!important;
}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-head h2,
html[data-theme="dark"] #dashboard-person-modal #person-trace-title,
html[data-theme="dark"] #dashboard-person-modal h3,
html[data-theme="dark"] #dashboard-comment-modal #dashboard-comment-title{color:#f3f7ff!important}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-head p,
html[data-theme="dark"] #dashboard-person-modal #person-trace-description,
html[data-theme="dark"] #dashboard-person-modal .db-detail-modal>p{color:#a9bdd4!important}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-total{color:#5f98ff!important;text-shadow:0 0 24px rgba(47,109,246,.18)}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-chip{
  background:#14283f!important;
  border-color:#31506d!important;
  color:#aec0d5!important;
}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-chip strong{color:#eef5ff!important}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-table-wrap,
html[data-theme="dark"] #dashboard-person-modal .db-detail-table-wrap{
  background:#0d1c2e!important;
  border-color:#33516d!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.015)!important;
}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-table th,
html[data-theme="dark"] #dashboard-person-modal .db-detail-table th{
  background:#17304a!important;
  color:#c9d8e9!important;
  border-bottom:1px solid #395a78!important;
}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-table tbody td,
html[data-theme="dark"] #dashboard-person-modal .db-detail-table tbody td{
  background:#102137!important;
  border-bottom:1px solid #29445f!important;
  color:#c6d4e5!important;
}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-table tbody tr:nth-child(even) td,
html[data-theme="dark"] #dashboard-person-modal .db-detail-table tbody tr:nth-child(even) td{background:#12253b!important}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-table tbody tr:hover td,
html[data-theme="dark"] #dashboard-person-modal .db-detail-table tbody tr:hover td{
  background:#19334d!important;
  color:#eef5ff!important;
}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-empty,
html[data-theme="dark"] #dashboard-person-modal .db-detail-empty{color:#8fa5bd!important}
html[data-theme="dark"] #dashboard-detail-modal .db-trace-btn,
html[data-theme="dark"] #dashboard-person-modal .db-trace-btn,
html[data-theme="dark"] #dashboard-person-modal .db-person-credits .btn{
  background:#132a42!important;
  border-color:#3b6489!important;
  color:#eef5ff!important;
  box-shadow:none!important;
}
html[data-theme="dark"] #dashboard-detail-modal .db-trace-btn:hover,
html[data-theme="dark"] #dashboard-person-modal .db-trace-btn:hover,
html[data-theme="dark"] #dashboard-person-modal .db-person-credits .btn:hover{
  background:#1a3857!important;
  border-color:#5e8fbd!important;
}
html[data-theme="dark"] #dashboard-detail-modal .db-observation-preview,
html[data-theme="dark"] #dashboard-person-modal .db-observation-preview{color:#bed0e4!important}
html[data-theme="dark"] #dashboard-detail-modal .db-observation-preview:hover,
html[data-theme="dark"] #dashboard-person-modal .db-observation-preview:hover{color:#84b7ff!important}
html[data-theme="dark"] #dashboard-comment-modal .db-comment-full{
  background:#0d1c2e!important;
  border-color:#33516d!important;
  color:#d2deeb!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.015)!important;
}
html[data-theme="dark"] .db-modal-top-actions .modal-close{
  background:#162b42!important;
  border-color:#365672!important;
  color:#dbe7f5!important;
}
html[data-theme="dark"] .db-modal-top-actions .modal-close:hover{background:#203a55!important;border-color:#557996!important;color:#fff!important}
html[data-theme="dark"] .db-modal-export{
  background:#123524!important;
  border-color:#2a6d49!important;
}
html[data-theme="dark"] .db-modal-export:hover{background:#18462f!important;border-color:#40936a!important;box-shadow:0 8px 20px rgba(0,0,0,.22)!important}
html[data-theme="dark"] .db-modal-export::after{background:#eaf4ff;color:#17365b;box-shadow:0 8px 22px rgba(0,0,0,.35)}

html[data-theme="dark"] #dashboard-detail-modal .db-detail-table-wrap,
html[data-theme="dark"] #dashboard-person-modal .db-detail-table-wrap,
html[data-theme="dark"] #dashboard-comment-modal .db-comment-full{
  scrollbar-color:#5e7892 #17283a;
}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-table-wrap::-webkit-scrollbar,
html[data-theme="dark"] #dashboard-person-modal .db-detail-table-wrap::-webkit-scrollbar,
html[data-theme="dark"] #dashboard-comment-modal .db-comment-full::-webkit-scrollbar{width:10px;height:10px}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-table-wrap::-webkit-scrollbar-track,
html[data-theme="dark"] #dashboard-person-modal .db-detail-table-wrap::-webkit-scrollbar-track,
html[data-theme="dark"] #dashboard-comment-modal .db-comment-full::-webkit-scrollbar-track{background:#17283a}
html[data-theme="dark"] #dashboard-detail-modal .db-detail-table-wrap::-webkit-scrollbar-thumb,
html[data-theme="dark"] #dashboard-person-modal .db-detail-table-wrap::-webkit-scrollbar-thumb,
html[data-theme="dark"] #dashboard-comment-modal .db-comment-full::-webkit-scrollbar-thumb{background:#5e7892;border:2px solid #17283a;border-radius:999px}

@media(max-width:760px){
  .db-modal-top-actions{top:10px;right:10px}
  .db-modal-export,.db-modal-top-actions .modal-close{width:34px;height:34px}
  #dashboard-detail-modal .db-detail-head{padding-right:5rem}
  #dashboard-person-modal .db-detail-modal>h2,#dashboard-comment-modal .db-comment-modal-card>h2{padding-right:5rem}
}

.db-workmix-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:flex-end}.db-capturing #workmix-export{visibility:hidden}
