/* CRM operativo */
.crm-system-alert{display:flex;align-items:flex-start;gap:8px;padding:13px 16px;border:1px solid #eccb8c;border-radius:12px;background:#fff8e9;color:#72531e}.crm-system-alert span{color:#866a38;font-size:.82rem}
.crm-shell{display:grid;gap:18px}.crm-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:25px;padding:28px;border-radius:20px;background:linear-gradient(135deg,var(--navy),#2f6e79);color:#fff}.crm-hero .eyebrow{color:#ffd596}.crm-hero h2{margin:0;font-size:2.2rem;letter-spacing:-.04em}.crm-hero p:last-child{margin:7px 0 0;color:#d2e0e5}.crm-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:11px}.crm-kpis article{display:flex;min-width:0;flex-direction:column;padding:18px;border:1px solid var(--line);border-radius:15px;background:#fff}.crm-kpis article.attention{border-color:#edc178;background:#fff9ef}.crm-kpis span{color:var(--muted);font-size:.72rem;font-weight:850}.crm-kpis b{margin:3px 0;font-size:1.5rem;white-space:nowrap}.crm-kpis small{color:#89969e}.crm-filters{display:grid;grid-template-columns:2fr repeat(4,1fr);gap:9px;margin:18px 0}.crm-filters label,.crm-profile-form label,.crm-interaction-form label{display:grid;gap:5px;color:#4f6472;font-size:.72rem;font-weight:850}.crm-filters input,.crm-filters select,.crm-profile-form input,.crm-profile-form select,.crm-profile-form textarea,.crm-interaction-form input,.crm-interaction-form select,.crm-interaction-form textarea{width:100%;border:1px solid var(--line);border-radius:9px;background:#fff;padding:9px 10px;color:var(--ink)}.crm-table-head,.crm-customer-row{display:grid;grid-template-columns:1.6fr .72fr .85fr .65fr .9fr auto;gap:13px;align-items:center}.crm-table-head{padding:10px 12px;border-radius:9px;background:#edf2f4;color:#6d7d87;font-size:.67rem;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.crm-customer-row{padding:14px 12px;border-bottom:1px solid var(--line)}.crm-customer-row[hidden]{display:none}.crm-customer-row>span{display:flex;min-width:0;flex-direction:column}.crm-customer-row small{color:var(--muted);font-size:.7rem}.crm-customer-row button,.crm-timeline button{border:1px solid #b8cad3;border-radius:8px;background:#fff;color:var(--blue);padding:8px 10px;font-weight:850}.crm-person{display:flex!important;flex-direction:row!important;align-items:center;gap:10px}.crm-person>i,.crm-profile-avatar{display:grid;place-items:center;flex:0 0 auto;width:42px;height:42px;border-radius:13px;background:linear-gradient(135deg,var(--blue),var(--teal));color:#fff;font-style:normal;font-weight:900}.crm-person>span{display:flex;min-width:0;flex-direction:column}.crm-person b,.crm-person small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-person em{width:max-content;max-width:100%;margin-top:3px;padding:2px 6px;border-radius:99px;background:var(--soft);color:var(--blue);font-size:.62rem;font-style:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-segment{display:inline-block;width:max-content;padding:5px 8px;border-radius:99px;background:#e4edf0;color:var(--blue);font-size:.68rem;font-style:normal;font-weight:900}.segment-vip{background:#fff0cc;color:#805600}.segment-en_riesgo,.segment-bloqueado{background:#fae5e7;color:#9a3843}.segment-nuevo{background:#e5f2ea;color:#27704f}.crm-alert,.crm-due{color:var(--danger)!important}.crm-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:42px;color:var(--muted)}.crm-empty b{color:var(--ink)}.crm-modal-loading{display:flex;align-items:center;justify-content:center;gap:13px;min-height:300px;color:var(--muted)}.crm-modal-loading span{width:24px;height:24px;border:3px solid var(--line);border-top-color:var(--teal);border-radius:50%;animation:advisor-spin .75s linear infinite}.crm-profile{padding:34px;background:#f4f7f8}.crm-profile-head{display:grid;grid-template-columns:auto 1fr auto;gap:15px;align-items:center;padding:8px 45px 24px 0}.crm-profile-avatar{width:58px;height:58px;border-radius:18px;font-size:1.1rem}.crm-profile-head h2{margin:0;font-size:2rem;letter-spacing:-.04em}.crm-profile-head p{margin:3px 0;color:var(--muted)}.crm-profile-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:13px}.crm-profile-kpis article{padding:14px;border:1px solid var(--line);border-radius:12px;background:#fff;display:flex;flex-direction:column}.crm-profile-kpis span{color:var(--muted);font-size:.68rem}.crm-profile-kpis b{margin-top:3px;font-size:1.08rem}.crm-profile-layout{display:grid;grid-template-columns:minmax(0,1fr) 285px;gap:13px;align-items:start}.crm-profile-main{display:grid;gap:13px}.crm-panel{padding:19px;border:1px solid var(--line);border-radius:15px;background:#fff}.crm-panel h3{margin:0 0 14px}.crm-panel h4{margin:0 0 10px}.crm-profile-side{position:sticky;top:0}.crm-profile-form{display:grid;gap:10px}.crm-profile-form textarea{min-height:105px;resize:vertical}.crm-profile-form>small{color:var(--muted)}.crm-interaction-form{display:grid;grid-template-columns:.7fr 1.3fr;gap:9px;padding:13px;border-radius:12px;background:#f4f7f8}.crm-interaction-form .wide{grid-column:1/-1}.crm-interaction-form textarea{min-height:68px;resize:vertical}.crm-interaction-form button{align-self:end}.crm-timeline{margin-top:14px}.crm-timeline article{display:grid;grid-template-columns:34px 1fr auto;gap:10px;padding:13px 0;border-top:1px solid var(--line)}.crm-timeline article>i{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:var(--soft);color:var(--blue);font-style:normal;font-weight:900}.crm-timeline article>span{display:flex;flex-direction:column}.crm-timeline p{margin:5px 0;color:#566b78;font-size:.82rem}.crm-timeline em{color:var(--green);font-size:.68rem;font-style:normal}.crm-timeline em.overdue{color:var(--danger);font-weight:900}.crm-timeline article.completed{opacity:.58}.crm-order{display:grid;grid-template-columns:1fr 1.4fr auto;gap:12px;align-items:center;padding:12px 0;border-top:1px solid var(--line)}.crm-order div{display:flex;flex-direction:column}.crm-order small,.crm-order>span{color:var(--muted);font-size:.72rem}.crm-case-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.crm-case-grid>div{padding:13px;border-radius:12px;background:#f7f9fa}.crm-case-grid article{padding:11px 0;border-top:1px solid var(--line)}.crm-case-grid article small{display:block;color:var(--muted)}.crm-case-grid article p{margin:5px 0;color:#586c78;font-size:.78rem}.modal:has(.crm-profile){width:min(1180px,100%)}
@media(max-width:1080px){.crm-kpis{grid-template-columns:repeat(3,1fr)}.crm-filters{grid-template-columns:2fr 1fr 1fr}.crm-table-head{display:none}.crm-customer-row{grid-template-columns:1.4fr .7fr .8fr auto}.crm-customer-row>span:nth-child(4),.crm-customer-row>span:nth-child(5){display:none}.crm-profile-layout{grid-template-columns:1fr}.crm-profile-side{position:static}.crm-profile-form{grid-template-columns:1fr 1fr}.crm-profile-form h3,.crm-profile-form button,.crm-profile-form>small,.crm-profile-form .consent-check{grid-column:1/-1}}
@media(max-width:680px){.crm-hero{align-items:stretch;flex-direction:column}.crm-kpis{grid-template-columns:1fr 1fr}.crm-filters{grid-template-columns:1fr 1fr}.crm-search{grid-column:1/-1}.crm-customer-row{grid-template-columns:1fr auto}.crm-customer-row>span:not(:first-child){display:none}.crm-profile{padding:22px 13px}.crm-profile-head{grid-template-columns:auto 1fr;padding-right:35px}.crm-profile-head>em{grid-column:2}.crm-profile-kpis{grid-template-columns:1fr 1fr}.crm-profile-form,.crm-interaction-form,.crm-case-grid{grid-template-columns:1fr}.crm-profile-form h3,.crm-profile-form button,.crm-profile-form>small,.crm-profile-form .consent-check,.crm-interaction-form .wide{grid-column:auto}.crm-order{grid-template-columns:1fr auto}.crm-order>span{grid-column:1/-1;grid-row:2}.crm-timeline article{grid-template-columns:32px 1fr}.crm-timeline article>button{grid-column:2;width:max-content}}
