/* The demo is a contained CRM workspace on the editorial landing. */
.crm-app {
  --crm-ink: #223025;
  --crm-secondary: #4b5d4e;
  --crm-line: #cbd3c4;
  --crm-light: #f3f5ed;
  overflow: hidden;
  border: 1px solid #424d38;
  border-radius: 18px;
  background: var(--crm-light);
  color: var(--crm-ink);
  box-shadow: 0 22px 70px #0003;
}
.crm-app button,.crm-app select {font:inherit}
.crm-app h3,.crm-app h4,.crm-app h5 {margin:0;line-height:1.22}
.crm-app h3 {font-size:clamp(1.65rem,3vw,2.55rem);letter-spacing:-.055em}
.crm-app h4 {font-size:1.12rem;letter-spacing:-.025em}
.crm-app h5 {font-size:.83rem;margin:18px 0 6px}
.crm-top,.crm-tabs,.crm-actions,.crm-chips,.crm-person,.crm-decision,.crm-page-heading,.crm-filters,.crm-quality {display:flex;align-items:center}
.crm-top {background:#232b22;color:#f2f4e9;padding:14px clamp(14px,2vw,28px);justify-content:space-between;gap:12px}
.crm-top strong {display:flex;align-items:center;gap:8px;font-size:1.05rem;letter-spacing:-.035em}
.crm-top strong span {color:#c3cdb9;font-weight:450}
.crm-top i {width:14px;height:14px;transform:skew(-15deg);border:2px solid #ddfa83;border-radius:4px}
.crm-demo-label,.crm-overline,.crm-caption,.crm-kpis small,.crm-log small,.crm-badge,.crm-columns small,.crm-mini-log {font-size:.76rem}
.crm-demo-label {color:#d9efac;font-family:ui-monospace,monospace}
.crm-tabs {background:#e4e9dc;gap:4px;padding:8px 12px;border-bottom:1px solid var(--crm-line);flex-wrap:wrap}
.crm-tabs button {background:transparent;border:0;border-radius:7px;color:var(--crm-secondary);padding:8px 14px;font-size:.88rem;font-weight:600}
.crm-tabs button[aria-pressed="true"] {background:#303e2f;color:white}
.crm-tabs button:hover,.crm-queue button:hover {box-shadow:inset 0 0 0 1px #82967c}
.crm-workspace {padding:clamp(14px,2.5vw,34px)}
.crm-page-heading {justify-content:space-between;align-items:end;gap:15px;flex-wrap:wrap;margin-bottom:20px}
.crm-overline {font-family:ui-monospace,monospace;letter-spacing:.065em;color:#51644c;margin-bottom:4px;text-transform:uppercase}
.crm-caption,.crm-log p,.crm-note p,.crm-metric small,.crm-reason,.crm-empty {color:var(--crm-secondary)}
.crm-split {display:grid;grid-template-columns:minmax(180px,.34fr) 1fr;gap:16px}
.crm-queue,.crm-file,.crm-pane,.crm-metric {background:#fcfdf8;border:1px solid var(--crm-line);border-radius:11px;min-width:0}
.crm-queue {padding:12px;align-self:start}
.crm-queue h4 {padding:5px 5px 11px}
.crm-queue h4 span {font:500 .75rem ui-monospace,monospace;color:#566850}
.crm-queue button {display:grid;text-align:left;gap:1px;border:1px solid transparent;border-top-color:#e1e5d9;border-radius:5px;background:transparent;color:var(--crm-ink);width:100%;padding:10px}
.crm-queue button[aria-pressed="true"] {background:#e5efd9;border-color:#8eae78}
.crm-queue button span,.crm-queue button small,.crm-person p {color:var(--crm-secondary);font-size:.78rem}
.crm-queue button small {font-size:.69rem}
.crm-person {gap:12px;flex-wrap:wrap}
.crm-person h4 {font-size:clamp(1.12rem,1.8vw,1.45rem)}
.crm-person .crm-badge {margin-left:auto}
.crm-avatar {display:grid;place-items:center;border-radius:9px;width:39px;aspect-ratio:1;background:#d9e4c9;color:#384b33;font-weight:750}
.crm-file,.crm-pane {padding:clamp(14px,2vw,23px)}
.crm-badge {display:inline-flex;align-items:center;width:fit-content;background:#e8ecdf;color:#40503b;border:1px solid #cdd6c2;border-radius:999px;padding:3px 9px;line-height:1.35}
.crm-badge.assigned {color:#204b39;background:#d9efdf}.crm-badge.recycle {color:#654a12;background:#faf0c9}.crm-badge.blocked {color:#733e36;background:#f8e4df}
.crm-message {border-left:3px solid #8aa657;background:#f0f3e9;margin:18px 0;padding:12px 16px;border-radius:0 8px 8px 0;font-size:1rem}
.crm-decision {gap:12px;margin:14px 0 9px}
.crm-score,.crm-quality strong {font:650 1.55rem/1.1 "DM Sans",sans-serif;letter-spacing:-.04em;color:#34552d}
.crm-score small,.crm-quality strong small {font-size:.78rem;color:#62775a}
.crm-chips,.crm-actions,.crm-filters {gap:8px;flex-wrap:wrap}
.crm-reason,.crm-empty {margin:12px 0;line-height:1.5}
.crm-note {padding:12px 14px;background:#eef3e4;border-radius:6px;margin:15px 0}
.crm-note b,.crm-note p {font-size:.87rem}
.crm-actions {margin-top:16px}
.crm-btn,.crm-app select {border:1px solid #bdc8b7;border-radius:7px;background:#f8faf4;color:var(--crm-ink);padding:8px 12px}
.crm-app .crm-btn {font-size:.85rem;font-weight:620}
.crm-btn:hover {background:#e5edda}
.crm-btn.primary {background:#344b32;color:white;border-color:#344b32}
.crm-btn.primary:hover {background:#243d29}
.crm-btn:disabled {opacity:.65;cursor:default}
.crm-app label {display:grid;gap:4px;color:#4a5d48;font-size:.76rem}
.crm-app select {max-width:100%;font-size:.88rem}
.crm-select-label {margin:13px 0 8px}
.crm-audit-layout,.crm-chart-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:14px}
.crm-log,.crm-evidence,.crm-bars,.crm-columns,.crm-mini-log {list-style:none;margin:12px 0 0;padding:0}
.crm-log li,.crm-evidence li {display:grid;grid-template-columns:4.4rem 1fr;gap:9px;padding:10px 0;border-bottom:1px solid #dce3d4}
.crm-log small,.crm-evidence time {font:500 .71rem/1.5 ui-monospace,monospace;color:#687963}
.crm-log b,.crm-log p,.crm-evidence q,.crm-evidence p {font-size:.85rem}
.crm-evidence li {grid-template-columns:2.8rem 1fr}
.crm-evidence p {margin-top:4px;color:var(--crm-secondary)}
.crm-quality {gap:14px;margin-top:14px;background:#ebf2df;padding:12px;border-radius:7px;font-size:.87rem}
.crm-quality strong {font-size:2rem}
.crm-kpis {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0}
.crm-metric {padding:13px 15px}
.crm-metric dt {font-size:.82rem;font-weight:600;color:var(--crm-secondary)}
.crm-metric dd {margin:5px 0;font-size:clamp(1.6rem,3vw,2.4rem);line-height:1.15;font-weight:630;letter-spacing:-.055em;font-variant-numeric:tabular-nums}
.crm-bars {display:grid;gap:12px;margin:18px 0}
.crm-bars li {display:grid;grid-template-columns:minmax(80px,1fr) minmax(38px,1.3fr) minmax(25px,auto);align-items:center;gap:8px;font-size:.82rem}
.crm-bars i {height:8px;overflow:hidden;background:#e5ebde;border-radius:5px}
.crm-bars b,.crm-columns i {display:block;height:100%;background:#72925d;border-radius:4px}
.crm-bars li:first-child b {background:#385a38}
.crm-columns {display:flex;align-items:flex-end;justify-content:space-around;gap:4px;border-bottom:1px solid var(--crm-line);padding-bottom:6px}
.crm-columns li {display:grid;justify-items:center;gap:4px;min-width:0;font-size:.75rem}
.crm-columns i {width:clamp(14px,3vw,30px);background:linear-gradient(#afcc85,#587953)}
.crm-columns small {color:var(--crm-secondary);font-size:.65rem}
.crm-mini-log li {border-top:1px solid var(--crm-line);padding:5px 0}
.crm-status {font-size:.82rem;color:#365334;background:#e4edd9;padding:9px clamp(14px,2.5vw,34px)}
.crm-status:empty {display:none}
@keyframes crm-fill {from{transform:scaleX(0)}to{transform:scaleX(1)}}
@media(prefers-reduced-motion:no-preference){.crm-bars b {transform-origin:left;animation:crm-fill .4s ease-out both}}
@media(max-width:760px){
  .crm-tabs {display:grid;grid-template-columns:1fr 1fr;padding:6px}
  .crm-tabs button {text-align:left;padding:8px 10px}
  .crm-kpis {grid-template-columns:1fr 1fr}
  .crm-split,.crm-audit-layout,.crm-chart-grid {grid-template-columns:1fr}
  .crm-queue {display:flex;overflow-x:auto;gap:5px;align-items:stretch}
  .crm-queue h4 {position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(100%)}
  .crm-queue button {width:auto;flex:0 0 auto;border:1px solid #dbe1d4}
  .crm-queue button span {display:none}
}
.crm-app .crm-subheading {margin:22px 0 10px}
.audit-controls {margin:14px 0}
.quality-panel {display:flex;align-items:center;gap:16px;padding:14px;border:1px solid #becfae;border-radius:12px;background:linear-gradient(120deg,#e4efdb,#f8fbf3)}
.quality-panel h5 {font-size:1rem;margin:0}
.quality-panel p {font-size:.81rem;color:#46603d;margin:5px 0 0;line-height:1.4}
.quality-dial {display:grid;place-content:center;justify-items:center;isolation:isolate;position:relative;flex:none;width:78px;aspect-ratio:1;border-radius:50%;background:conic-gradient(#44704c var(--points),#ccd9c0 0);font-variant-numeric:tabular-nums}
.quality-dial::before {content:"";position:absolute;z-index:-1;inset:6px;background:#f9fcf5;border-radius:50%}
.quality-dial strong {font-size:1.85rem;line-height:1;color:#345237}
.quality-dial small {font:500 .68rem ui-monospace,monospace;color:#52694a}
.crm-evidence .awaiting-result p {visibility:hidden}
.crm-dialer {background:#f6f8ef}
.phone-stage {display:grid;place-items:center;margin:14px 0;padding:20px 8px;border-radius:12px;background:radial-gradient(ellipse at center,#c6d5b8 0%,#e7eddf 62%,#eff2e8 100%)}
.crm-phone {box-sizing:border-box;display:flex;flex-direction:column;align-items:stretch;gap:10px;position:relative;width:min(100%,255px);min-height:358px;padding:12px clamp(12px,2vw,19px) 19px;border:5px solid #202922;border-radius:37px;background:radial-gradient(ellipse at 15% 0%,#365b53,transparent 65%),linear-gradient(158deg,#22382d,#15241f 85%);color:#fff;box-shadow:0 14px 24px -15px #1a301bc4,inset 0 0 0 1px #8c9c8980;text-align:center}
.phone-speaker,.phone-home {align-self:center}
.phone-speaker {width:48px;height:7px;border-radius:8px;background:#111b17;margin:0 auto 4px}
.phone-home {margin-top:4px;width:59px;height:3px;border-radius:4px;background:#a8bbae}
.phone-status {color:#d7ebd6;font:600 .74rem/1.5 ui-monospace,monospace}
.phone-contact {flex:1;display:grid;align-content:center;justify-items:center;gap:6px;padding:8px 0}
.phone-contact strong {font-size:1.35rem;letter-spacing:-.04em;line-height:1.1}
.phone-contact p,.phone-script,.phone-thanks {font-size:.85rem;line-height:1.45;color:#d8e5d9;margin:0}
.phone-monogram {display:grid;place-items:center;width:66px;aspect-ratio:1;border-radius:50%;margin-bottom:9px;font-size:1.5rem;color:#e7f7cc;background:linear-gradient(150deg,#57755c,#334d42);border:1px solid #859c80}
.crm-phone .crm-btn {background:#d3edab;color:#1e392b;border:0;min-height:44px}
.phone-pair {display:flex;justify-content:space-around}
.crm-app .phone-key,.crm-app .phone-link {border:0;background:transparent;color:white}
.crm-app .phone-key {display:grid;justify-items:center;gap:5px;font-size:.8rem}
.phone-key i {display:grid;place-items:center;width:46px;height:46px;border-radius:50%;font:500 1.35rem/1 "DM Sans",sans-serif}
.phone-key[data-action="answer"] i {background:#327a4b}
.phone-key[data-action="reject"] i {background:#b54443;transform:rotate(138deg)}
.crm-app .phone-link {font-size:.79rem;min-height:32px;text-decoration:underline;text-underline-offset:3px}
.phone-voice {display:grid;justify-items:center;gap:5px;margin:8px 0 0;font-size:.92rem}
.voice-bars {height:26px;display:flex;align-items:center;gap:3px}
.voice-bars i {display:block;width:3px;height:10px;background:#c9e99e;border-radius:3px}
.voice-bars i:nth-child(2),.voice-bars i:nth-child(4) {height:17px}
.voice-bars i:nth-child(3) {height:25px}
.phone-script {text-align:left;padding:9px 10px;background:#ffffff0e;border-left:2px solid #a9c77e;border-radius:5px}
.phone-options {display:grid;gap:6px;margin-top:auto}
.phone-options .phone-key {display:flex;align-items:center;gap:9px;border-radius:8px;background:#ffffff0e;text-align:left;padding:4px 7px;min-height:43px}
.phone-options .phone-key i {width:29px;height:29px;font-size:1rem;color:#e0f6b7;background:#48634e}
.crm-phone button:focus-visible {outline:2px solid #fff;outline-offset:2px}
.crm-phone button:hover {filter:brightness(1.14)}
.crm-app .phone-rating {color:white;text-align:left}
.crm-app .ring-setting {display:flex;align-items:center;gap:7px;font-size:.82rem}
.ring-setting input {width:16px;height:16px;accent-color:#38553a}
@keyframes phone-vibrate {0%,36%,100%{transform:rotate(0)}7%,21%{transform:rotate(-1.6deg)}14%,28%{transform:rotate(1.6deg)}}
@keyframes call-wave {0%{box-shadow:0 0 0 0 #bad99f70}80%,100%{box-shadow:0 0 0 16px #bad99f00}}
@media(prefers-reduced-motion:no-preference) {
  .crm-phone[data-phase="ringing"] {animation:phone-vibrate 1.35s ease-in-out 3}
  .ring-wave {animation:call-wave 1.35s ease-out 3}
}
@media(max-width:760px) {
  .crm-dialer {grid-row:1}
  .phone-stage {padding:16px 4px}
}

.arm-flow {margin:0 0 18px;padding:clamp(14px,2vw,24px);border-radius:13px;background:#20352f;color:#eff6eb}
.arm-flow header {display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px}
.arm-flow header h4 {color:#eff6eb}
.arm-flow button {cursor:pointer}
.arm-flow [data-flow-play] {border:1px solid #71887c;border-radius:7px;padding:6px 12px;background:transparent;color:#e5f5e5;font-size:.8rem}
.flow-map {position:relative;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(36px,.24fr) minmax(0,1fr);align-items:center}
.flow-connector {text-align:center;color:#98b2a0;font:500 1.6rem/1 monospace}
.flow-message {padding:14px 16px;background:#f7fbf3;color:#283b30;border-radius:12px 12px 12px 2px;min-width:0}
.flow-message div {display:flex;flex-wrap:wrap;align-items:center;gap:7px}
.flow-message small {font-size:.68rem;color:#41664d;background:#e0eddd;padding:2px 6px;border-radius:4px}
.flow-message b {font-size:.9rem}
.flow-message p {margin:9px 0;line-height:1.4;font-size:.94rem}
.flow-message span {color:#496452;font:550 .73rem/1.3 ui-monospace,monospace}
.flow-message[data-phase="analysis"] span {color:#835922}
.flow-message[data-phase="delivered"][data-route="blocked"] span {color:#913d36}
.flow-destinations {display:grid;gap:6px}
.flow-destinations>div {display:grid;grid-template-columns:9px 1fr auto;align-items:center;gap:10px;padding:9px 13px;background:#2a4039;border:1px solid #52695d;color:#dce8de;border-radius:7px;font-size:.85rem}
.flow-destinations i {width:8px;height:8px;border-radius:50%;background:#accf9f}
.flow-destinations [data-destination="blocked"] i {background:#efad99}
.flow-destinations [data-destination="recycle"] i {background:#e5ca8c}
.flow-destinations b {font-variant-numeric:tabular-nums}
.flow-destinations .receiving {background:#354f41;border-color:#b6d79d;color:#fff}
.flow-destinations [data-destination="blocked"].receiving {background:#553c37;border-color:#d99884}
.flow-destinations [data-destination="recycle"].receiving {background:#4c4839;border-color:#ddc58c}
.flow-receipts {display:flex;gap:6px;flex-wrap:wrap}
.flow-receipts:not(:empty) {margin-top:14px}
.arm-flow .flow-receipt {display:flex;flex-wrap:wrap;gap:5px;padding:5px 8px;border-radius:5px;border:1px solid #607b66;background:#2b4438;color:#e3eddd;font-size:.74rem;text-align:left}
.arm-flow .flow-receipt.blocked {background:#493832;color:#ffe6de}
.arm-flow .flow-receipt.recycle {background:#464331;color:#f5edcf}
.arm-flow button:focus-visible {outline:2px solid #def59e;outline-offset:2px}
.flow-token {position:absolute;pointer-events:none;z-index:2;display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#d3f09f;color:#213a2c;box-shadow:0 1px 6px #0005;font:bold .7rem "DM Sans",sans-serif}
.flow-token.blocked {background:#ffb3a1;color:#552e29}
.flow-token.recycle {background:#efd698;color:#4d3d22}
@keyframes flow-arrive {from{transform:translateX(-11px);opacity:.35}to{transform:translateX(0);opacity:1}}
@media(prefers-reduced-motion:no-preference){.flow-message[data-phase="arrival"],.flow-receipt:last-child {animation:flow-arrive .32s ease-out both}}
@media(min-width:761px){.crm-queue {max-height:480px;overflow-y:auto}}
@media(max-width:600px){
  .flow-map {grid-template-columns:1fr;gap:10px}
  .flow-connector {display:none}
  .flow-destinations {grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
  .flow-destinations>div {display:flex;flex-direction:column;justify-content:center;gap:4px;padding:6px 2px;font-size:.71rem;line-height:1.1;text-align:center}
  .flow-destinations i {display:none}
}

/* Criterios de auditoría, comparación de períodos, franjas horarias y simulador de base */
.sr-only {position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.audit-profile-label {margin:14px 0 6px}
.audit-profile {display:inline-flex;gap:3px;padding:3px;background:#e4e9dc;border:1px solid var(--crm-line);border-radius:9px;flex-wrap:wrap}
.audit-profile button {border:0;background:transparent;border-radius:6px;padding:7px 12px;font-size:.82rem;font-weight:620;color:var(--crm-secondary)}
.audit-profile button[aria-pressed="true"] {background:#fcfdf8;color:var(--crm-ink);box-shadow:0 1px 3px #22302533}
.audit-compare {display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px;padding:12px;border:1px dashed #8eae78;border-radius:10px;background:#eef4e6}
.audit-compare div {display:grid}
.audit-compare small {font-size:.74rem;color:var(--crm-secondary)}
.audit-compare b {font-size:1.7rem;letter-spacing:-.05em;font-variant-numeric:tabular-nums}
.audit-compare p {grid-column:1/-1;font-size:.85rem;color:var(--crm-ink)}
.crm-metric .crm-delta {display:block;margin-top:4px;font-weight:600}
.crm-delta.up {color:#3c6a2a}
.crm-delta.down {color:#9a4a2b}
.crm-delta.flat {color:var(--crm-secondary)}
.crm-heat-pane,.ivr-sim {margin-top:16px}
.heat-head {display:flex;justify-content:space-between;align-items:start;gap:12px;flex-wrap:wrap}
.heat-best {font-size:.8rem;padding:6px 10px;border-radius:99px;background:#344b32;color:#f2f7e7}
.heat-best b {color:#dcfa75}
.heat-scroll {overflow-x:auto;margin-top:14px}
.crm-heat {border-collapse:separate;border-spacing:4px;width:100%;min-width:430px;font-size:.76rem}
.crm-heat th {font:500 .72rem ui-monospace,monospace;color:var(--crm-secondary);text-align:center;padding:2px}
.crm-heat tbody th {text-align:left;padding-right:6px}
.crm-heat td {padding:0}
.crm-heat button {width:100%;min-height:38px;border:1px solid transparent;border-radius:7px;font-weight:650;font-variant-numeric:tabular-nums;
  background:color-mix(in srgb,#2f6b33 calc(var(--heat) * 100%),#eef2e7);color:#1f2c21;transition:transform .15s,box-shadow .15s}
.crm-heat button:hover {transform:translateY(-1px);box-shadow:0 3px 8px #22302533}
.crm-heat button.is-dark {color:#fff}
.crm-heat button[aria-pressed="true"] {border-color:#1f2c21;box-shadow:0 0 0 2px #dcfa75,0 0 0 4px #1f2c21}
.crm-heat button.is-best::after {content:"★";margin-left:3px;color:#dcfa75}
.heat-detail {margin-top:10px;font-size:.86rem;color:var(--crm-secondary);min-height:2.8em}
.heat-detail b {color:var(--crm-ink)}
.sim-controls {display:flex;flex-wrap:wrap;gap:12px 22px;align-items:end;margin:14px 0}
.sim-range {display:grid;gap:4px;flex:1 1 260px;font-size:.84rem;font-weight:600;color:var(--crm-secondary)}
.sim-range output {font-size:1.4rem;color:var(--crm-ink);letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.sim-range input {accent-color:#344b32;width:100%}
.sim-kpis .crm-metric dd {font-size:clamp(1.4rem,2.6vw,2rem)}
.sim-note {font-size:.86rem;color:var(--crm-secondary);margin-top:12px}
.sim-note b {color:var(--crm-ink)}
@media(prefers-reduced-motion:no-preference){
  .crm-heat button {animation:heat-in .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i) * 14ms)}
  .audit-compare {animation:crm-fill .4s ease-out both}
}
@keyframes heat-in {from{opacity:0;transform:scale(.7)}to{opacity:1;transform:none}}
