/* Sistema de diseño "Océano Dorado" — capa global cargada al final. Revertir: quitar su <link> de index.html. Fuente: Plus Jakarta Sans (SIL OFL 1.1), alojada en /assets/fonts. */
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/PlusJakartaSans-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/PlusJakartaSans-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/PlusJakartaSans-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/PlusJakartaSans-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/PlusJakartaSans-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/PlusJakartaSans-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/PlusJakartaSans-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/PlusJakartaSans-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:800;font-display:swap;src:url('/assets/fonts/PlusJakartaSans-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:800;font-display:swap;src:url('/assets/fonts/PlusJakartaSans-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
:root{
 --bg:#EAF1F2;--surface:#FFFFFF;--surface-soft:#F5F9F9;--primary:#0E4F5C;--primary-dark:#0A3F4A;--on-primary:#FFFFFF;--sidebar-text:#B6D2D6;--sidebar-muted:#9CC3C8;
 --text:#10292F;--text-muted:#4F666B;--text-subtle:#5E7479;--btn-soft:#E1ECEE;--btn-soft-hover:#D0E3E6;--gold:#D4A845;--gold-hover:#C29634;--on-gold:#0B2E36;
 --urgent-bg:#FBF3DF;--urgent-icon-bg:#F6E7C1;--urgent-text:#86621A;--urgent-strong:#6E5010;--attention-icon-bg:#DCEBEC;--attention-text:#0E4F5C;--info-icon-bg:#DDE8F7;--info-text:#2D5A99;--ring-track:#1C6878;--ring-fill:#E2B955;
 --line-soft:#E3ECEE;--input-border:#D6E3E5;--avatar-bg:#F4E6C4;--avatar-text:#6E5010;--focus-ring:rgba(14,79,92,.35);--overlay:rgba(10,63,74,.45);
 --font:"Plus Jakarta Sans",system-ui,sans-serif;--r-sidebar:26px;--r-card:24px;--r-row:16px;--r-ctl:12px;--r-pill:999px;--layout-pad:20px;--gap:18px;--card-pad:22px;--shadow-card:0 1px 3px rgba(16,41,47,.05);--ease:150ms ease;
 --ob-sidebar-w:240px;--ob-rail-w:72px;
 /* puentes hacia las variables existentes del panel */
 --ink:var(--text);--line:var(--line-soft);--muted:var(--text-muted);--green:var(--primary);--green-hover:var(--primary-dark);--mint:var(--attention-icon-bg);--nav:var(--primary);
 --bg-app:var(--bg);--bg-surface:var(--surface);--bg-surface-hover:var(--surface-soft);--bg-surface-secondary:var(--surface-soft);--border-default:var(--input-border);--border-subtle:var(--line-soft);--border-active:var(--primary);--brand-primary:var(--primary);--brand-primary-hover:var(--primary-dark);--brand-primary-soft:var(--btn-soft);--brand-accent:var(--gold);--text-primary:var(--text);--text-secondary:var(--text-muted);
 --color-app-bg:var(--bg);--color-border:var(--line-soft);--color-border-soft:var(--line-soft);--color-surface:var(--surface);--color-surface-soft:var(--surface-soft);--color-text-primary:var(--text);--color-text-secondary:var(--text-muted);--color-text-muted:var(--text-subtle);--color-brand-turquoise:var(--primary);--color-brand-turquoise-strong:var(--primary-dark);--color-brand-turquoise-soft:var(--btn-soft);--color-navy-900:var(--primary);--color-navy-800:var(--primary-dark);--color-sidebar:var(--primary);
 --ix-bg:var(--bg);--ix-surface:var(--surface);--ix-brand:var(--primary);--ix-brand-600:var(--primary-dark);--ix-brand-50:var(--surface-soft);--ix-brand-100:var(--btn-soft);--ix-ink:var(--text);--ix-ink-2:var(--text-muted);--ix-muted:var(--text-subtle);--ix-line:var(--line-soft);--ix-line-soft:var(--line-soft);--ix-r:var(--r-row);--ix-shadow:var(--shadow-card);
 --as-brand:var(--primary);--as-brand-50:var(--surface-soft);--as-ink:var(--text);--as-line:var(--line-soft);--as-muted:var(--text-muted);--as-soft:var(--surface-soft);--crm-ink:var(--text);--crm-line:var(--line-soft);--crm-muted:var(--text-muted);--crm-teal:var(--primary);--pl-line:var(--line-soft)}
html body{background:var(--bg);color:var(--text);font-family:var(--font);font-weight:500}
html body :is(button,input,select,textarea){font-family:var(--font)}
/* Tipografía */
html body #main .page-heading h1,html body #main>h1{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1.15;color:var(--text)}
html body #main .page-heading p{font-size:14px;font-weight:500;color:var(--text-muted)}
html body .eyebrow{font-size:12px;font-weight:700;letter-spacing:.08em;color:var(--text-subtle)}
html body :is(.panel-heading h2,.panel>h2,.section-heading h2,.panel h2){font-size:18px;font-weight:800;color:var(--text);letter-spacing:-.01em}
html body :is(.metric-value,.metric strong,.crm-stat strong,.bulk-stat strong){font-size:34px;font-weight:800;letter-spacing:-.03em;color:var(--text)}
html body :is(.metric-label,.metric small){font-size:13px;font-weight:500;color:var(--text-muted)}
/* Layout */
html body .app-shell{margin-left:calc(var(--ob-sidebar-w) + var(--layout-pad) * 2)}
html body.sidebar-collapsed .app-shell{margin-left:calc(var(--ob-rail-w) + var(--layout-pad) * 2)}
html body #main{padding:var(--layout-pad) var(--layout-pad) var(--layout-pad) 0}
html body .app-footer{padding:12px var(--layout-pad) 20px 0;color:var(--text-subtle)}
/* Sidebar flotante */
html body .sidebar,html body.sidebar-collapsed .sidebar{top:var(--layout-pad);left:var(--layout-pad);bottom:var(--layout-pad);height:auto;width:var(--ob-sidebar-w);background:var(--primary);color:var(--sidebar-text);border:0;border-radius:var(--r-sidebar);box-shadow:none;padding:18px 14px 14px}
html body.sidebar-collapsed .sidebar{width:var(--ob-rail-w);padding:18px 10px 12px}
html body .sidebar:before,html body .sidebar .brand:after,html body .sidebar .brand.official-brand:after{display:none;content:none}
html body .sidebar .brand-row{border:0;padding:0 4px 8px;margin:0 0 6px}
html body .sidebar .wnav-mark{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:var(--r-ctl);background:var(--surface);border:0}
html body .sidebar .wnav-mark img{width:24px;height:24px}
html body .sidebar .wnav-word{margin-left:10px}
html body .sidebar .wnav-word strong{font:800 17px/1.1 var(--font);color:var(--on-primary);letter-spacing:-.02em}
html body .sidebar .wnav-word em{font-style:normal;color:var(--on-primary)}
html body .sidebar .wnav-word small{font:500 11px var(--font);letter-spacing:0;text-transform:none;color:var(--sidebar-muted);margin-top:3px}
html body .sidebar .collapse-btn,html body.sidebar-collapsed .sidebar .brand-row .top-collapse{width:36px;height:36px;border-radius:var(--r-ctl);background:var(--primary-dark);border:0;color:var(--sidebar-text);box-shadow:none;animation:none}
html body .sidebar .wnav-search{height:40px;margin:6px 0 4px;padding:0 12px;border-radius:var(--r-ctl);background:var(--primary-dark);border:1px solid transparent;color:var(--sidebar-muted)}
html body .sidebar .wnav-search input{color:var(--on-primary);font:500 13px var(--font)}
html body .sidebar .wnav-search input::placeholder{color:var(--sidebar-muted)}
html body .sidebar .wnav-search:focus-within{border-color:var(--sidebar-muted)}
html body .sidebar .nav-heading{margin:16px 12px 6px;padding:0;color:var(--sidebar-muted);font:700 11px var(--font);letter-spacing:.08em;text-transform:uppercase}
html body .sidebar .nav-heading:before{display:none}
html body .sidebar .nav-link{min-height:42px;height:42px;padding:0 12px;margin:1px 0;gap:10px;border:0;border-radius:var(--r-ctl);background:transparent;color:var(--sidebar-text);font:600 14px var(--font);box-shadow:none;transform:none;transition:background var(--ease),color var(--ease)}
html body .sidebar .nav-link .icon{width:18px;height:18px;stroke-width:1.8;color:currentColor;filter:none;transform:none}
html body .sidebar .nav-link:hover{background:rgba(255,255,255,.06);color:var(--on-primary);box-shadow:none;transform:none}
html body .sidebar .nav-link:hover .icon{color:var(--on-primary);filter:none;transform:none}
html body .sidebar .nav-link.active,html body .sidebar>nav>.nav-link:first-child.active{background:var(--surface);color:var(--primary);font-weight:700;box-shadow:none}
html body .sidebar .nav-link.active .icon{color:var(--primary)}
html body .sidebar .nav-link.active:before,html body .sidebar .nav-link.active:after{display:none}
html body .sidebar>nav>.nav-link:first-child{position:static;background:transparent;box-shadow:none}
html body .sidebar .wnav-count{margin-left:auto;min-width:22px;height:20px;padding:0 7px;display:inline-grid;place-items:center;border-radius:var(--r-pill);background:var(--gold);color:var(--on-gold);font:800 11px var(--font)}
html body .sidebar .wnav-alert{margin-left:6px;width:9px;height:9px;border-radius:50%;background:var(--gold);box-shadow:0 0 0 2px var(--primary)}
html body .sidebar .wnav-count[hidden]+.wnav-alert{margin-left:auto}
html body .sidebar .wnav-live{margin-left:auto;width:8px;height:8px;border-radius:50%;background:var(--ring-fill)}
html body .sidebar .wnav-soon{color:var(--sidebar-muted);font-weight:600}
html body .sidebar .wnav-soon .nav-chevron{margin-left:auto;transition:transform var(--ease)}
html body .sidebar .wnav-soon[aria-expanded="true"] .nav-chevron{transform:rotate(180deg)}
html body .sidebar .subnav{border-left:1px solid rgba(182,210,214,.25);margin-left:20px;padding-left:6px}
html body .sidebar .wnav-locked{height:36px;min-height:36px;color:var(--sidebar-muted);font-size:13px;font-weight:500}
html body .sidebar .wnav-admin .nav-heading{color:var(--ring-fill)}
html body .sidebar .wnav-empty{color:var(--sidebar-muted)}
html body .sidebar .nav-live{background:rgba(255,255,255,.12);color:var(--on-primary)}
html body .sidebar .support-card{display:none}
html body .sidebar .sidebar-upgrade{margin:8px 0 10px;padding:14px;border:0;border-radius:var(--r-row);background:var(--primary-dark);box-shadow:none}
html body .sidebar .sidebar-upgrade strong{color:var(--on-primary);font-weight:700}
html body .sidebar .sidebar-upgrade p{color:var(--sidebar-muted)}
html body .sidebar .sidebar-upgrade-crown{background:rgba(212,168,69,.16);color:var(--gold)}
html body .sidebar .sidebar-upgrade-link{min-height:38px;border-radius:var(--r-ctl);background:var(--gold);color:var(--on-gold);font:700 13px var(--font);box-shadow:none;transition:background var(--ease)}
html body .sidebar .sidebar-upgrade-link:hover{background:var(--gold-hover);color:var(--on-gold)}
html body .sidebar .sidebar-profile{margin:0;padding:10px 8px;border:0;border-top:1px solid rgba(182,210,214,.18);border-radius:0;background:transparent;color:var(--on-primary)}
html body .sidebar .sidebar-profile:hover{background:rgba(255,255,255,.06);border-radius:var(--r-ctl)}
html body .sidebar .sidebar-profile small,html body .sidebar .sidebar-profile>.icon{color:var(--sidebar-muted)}
html body .sidebar .mini-avatar{background:var(--avatar-bg);color:var(--avatar-text)}
html body .sidebar>nav{scrollbar-color:rgba(182,210,214,.35) transparent}
/* Riel de íconos (colapsado) */
html body.sidebar-collapsed .sidebar :is(.nav-label,.nav-heading,.wnav-search,.wnav-word,.sidebar-upgrade,.wnav-count,.wnav-soon .nav-chevron,.sidebar-profile>span:not(.mini-avatar),.sidebar-profile>.icon){display:none}
html body.sidebar-collapsed .sidebar .nav-link{justify-content:center;padding:0}
html body.sidebar-collapsed .sidebar .subnav{margin-left:0;padding-left:0;border:0}
html body.sidebar-collapsed .sidebar .wnav-alert{position:absolute;top:8px;right:10px;margin:0}
html body.sidebar-collapsed .sidebar .nav-link{position:relative}
/* Encabezado del contenido sin barra */
html body .topbar,html body.crm-inbox-active .topbar{height:auto;min-height:72px;padding:var(--layout-pad) var(--layout-pad) 4px 0;background:transparent;border:0;box-shadow:none;backdrop-filter:none}
html body .topbar:before{display:none}
html body .topbar .greeting strong,html body .topbar .greeting h1{color:var(--text);font-weight:700}
html body .topbar :is(.greeting small,.greeting p,.greeting span){color:var(--text-muted)}
html body .topbar-divider{background:var(--input-border)}
html body .topbar .icon-btn,html body .icon-btn{width:42px;height:42px;border-radius:var(--r-ctl);background:var(--surface);border:0;color:var(--primary);box-shadow:var(--shadow-card);transition:background var(--ease)}
html body .icon-btn:hover{background:var(--surface-soft)}
html body .topbar .avatar{background:var(--avatar-bg);color:var(--avatar-text);border:0;box-shadow:none}
html body .preview-badge{background:var(--surface);color:var(--primary);border:0;border-radius:var(--r-pill);font-weight:600}
/* Botones */
html body .btn{min-height:38px;padding:0 16px;border-radius:var(--r-ctl);font:700 13px var(--font);box-shadow:none;transform:none;transition:background var(--ease),color var(--ease),box-shadow var(--ease)}
html body .btn.primary{background:var(--gold);border:0;color:var(--on-gold)}
html body .btn.primary:hover{background:var(--gold-hover);color:var(--on-gold);box-shadow:none;transform:none}
html body .btn.primary .icon{color:var(--on-gold)}
html body .btn.secondary,html body .btn:not(.primary):not(.danger):not(.text-btn){background:var(--btn-soft);border:0;color:var(--primary)}
html body .btn.secondary:hover,html body .btn:not(.primary):not(.danger):not(.text-btn):hover{background:var(--btn-soft-hover);color:var(--primary)}
html body .btn.danger{border-radius:var(--r-ctl)}
html body :is(.btn,.icon-btn,.nav-link,a,input,select,textarea,button,[tabindex]:not(#main)):focus-visible{outline:none;box-shadow:0 0 0 2px var(--focus-ring)}
html body #main:focus,html body #main:focus-visible{outline:none;box-shadow:none}
/* Cards */
html body :is(.panel,.metric,.status-panel,.info-card,.empty){background:var(--surface);border:0;border-radius:var(--r-card);box-shadow:var(--shadow-card)}
html body .panel{padding:var(--card-pad)}
html body .panel:has(>.panel-heading),html body .panel:has(>table),html body .panel:has(>.table-wrap){padding:0}
html body .panel-heading{padding:var(--card-pad) var(--card-pad) 12px;border-bottom:0;background:transparent}
html body .metric{padding:var(--card-pad)}
html body :is(.metrics,.crm-stat-grid,.operation-metrics,.bulk-stats){gap:var(--gap)}
/* Inputs */
html body #main :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([role=switch]),select),html body #modal :is(input:not([type=checkbox]):not([type=radio]):not([role=switch]),select){min-height:40px;border-radius:var(--r-ctl);background:var(--surface);border:1px solid var(--input-border);color:var(--text);transition:box-shadow var(--ease),border-color var(--ease)}
html body :is(#main,#modal) textarea{border-radius:var(--r-ctl);background:var(--surface);border:1px solid var(--input-border);color:var(--text)}
html body :is(input,select,textarea):focus{border-color:var(--primary);box-shadow:0 0 0 2px var(--focus-ring);outline:none}
/* Tablas */
html body #main table th{background:transparent;color:var(--text-subtle);font:700 12px var(--font);letter-spacing:0;text-transform:none;border-bottom:1px solid var(--line-soft)}
html body #main table td{height:52px;border-bottom:1px solid var(--line-soft);color:var(--text)}
html body #main table tbody tr{transition:background var(--ease)}
html body #main table tbody tr:hover{background:var(--surface-soft)}
/* Badges y estados */
html body :is(.badge,.status-badge,.user-status,.service-chip){border-radius:var(--r-pill);font-weight:700;font-size:12px;border:0}
html body :is(.status-pending,.status-processing,.status-retrying,.status-approval-pending,.status-requires-mapping,.status-plan-mapping-required){background:var(--urgent-bg);color:var(--urgent-strong)}
html body :is(.status-active,.status-enabled,.status-completed,.status-done){background:var(--attention-icon-bg);color:var(--attention-text)}
html body :is(.status-error,.status-failed,.status-blocked){background:#FBE4E2;color:#8A2A1F}
html body :is(.status-simulation,.status-shadow){background:var(--info-icon-bg);color:var(--info-text)}
/* Modales */
html body dialog#modal,html body .crm-preview-dialog{border:0;border-radius:var(--r-card);background:var(--surface);box-shadow:0 20px 50px rgba(10,63,74,.18)}
html body dialog#modal::backdrop{background:var(--overlay)}
html body .crm-preview-backdrop{background:var(--overlay);backdrop-filter:none}
html body .modal-heading h2{font-size:18px;font-weight:800;color:var(--text)}
/* Toast */
html body .toast{border-radius:var(--r-row);background:var(--primary);color:var(--on-primary)}
/* CRM 360°: acentos a la paleta */
html body .crm-handoff-view{background:var(--gold);color:var(--on-gold);border-radius:var(--r-ctl);font-weight:700}
html body .crm-handoff-view:hover{background:var(--gold-hover)}
html body .crm-handoff-banner{background:var(--urgent-bg);border:0;border-radius:var(--r-row);color:var(--urgent-text);box-shadow:none}
html body .crm-handoff-copy strong{color:var(--urgent-strong)}
html body .crm-handoff-copy small{color:var(--urgent-text)}
html body .crm-handoff-pulse{background:var(--gold);animation:none;box-shadow:0 0 0 4px var(--urgent-icon-bg)}
html body .crm-handoff-gear{border:0;border-radius:var(--r-ctl);background:var(--surface);color:var(--primary)}
html body .crm-conversation-item .crm-conversation-copy span.crm-handoff-badge{background:var(--urgent-icon-bg);color:var(--urgent-strong)!important}
html body .crm-conversation-item.handoff-forgotten{box-shadow:inset 3px 0 0 var(--gold);background:var(--urgent-bg)}
html body .crm-handoff-count{background:var(--gold);color:var(--on-gold)}
html body .crm-doc-view{background:var(--primary);color:var(--on-primary);border-radius:var(--r-ctl)}
html body .crm-doc-download{background:var(--btn-soft);color:var(--primary);border:0;border-radius:var(--r-ctl)}
html body .crm-link-card{border-color:var(--line-soft);border-radius:var(--r-row)}
/* Responsive: riel < 1024px, drawer <= 760px */
@media (min-width:761px) and (max-width:1023px){
 html body .app-shell,html body.sidebar-collapsed .app-shell{margin-left:calc(var(--ob-rail-w) + var(--layout-pad) * 2)}
 html body .sidebar{width:var(--ob-rail-w);padding:18px 10px 12px}
 html body .sidebar :is(.nav-label,.nav-heading,.wnav-search,.wnav-word,.sidebar-upgrade,.wnav-count,.wnav-soon .nav-chevron,.sidebar-profile>span:not(.mini-avatar),.sidebar-profile>.icon,.collapse-btn){display:none}
 html body .sidebar .nav-link{justify-content:center;padding:0;position:relative}
 html body .sidebar .subnav{margin-left:0;padding-left:0;border:0}
 html body .sidebar .wnav-alert{position:absolute;top:8px;right:10px;margin:0}
 html body .sidebar .brand-row{justify-content:center}
}
@media (max-width:760px){
 html body .app-shell,html body.sidebar-collapsed .app-shell{margin-left:0}
 html body .sidebar,html body.sidebar-collapsed .sidebar{top:10px;left:10px;bottom:10px;width:min(280px,calc(100vw - 20px))}
 html body #main{padding:16px}
 html body .topbar{padding:16px 16px 4px}
 html body .app-footer{padding:12px 16px 18px}
 html body #main :is(.metrics,.crm-stat-grid,.operation-metrics,.bulk-stats,.dashboard-grid){grid-template-columns:1fr}
 html body #main .page-heading h1{font-size:28px}
}
@media (prefers-reduced-motion:reduce){html body *{transition:none!important}}
html body svg.icon{stroke-width:1.8}
html body .sidebar .wnav-search{display:flex;align-items:center;gap:8px}
html body .sidebar .wnav-search .icon{width:18px;height:18px;flex:none}
html body .sidebar .wnav-search input{flex:1;min-width:0;height:100%;padding:0;border:0;background:transparent;box-shadow:none;outline:none}
html body .sidebar .brand-row{display:flex;align-items:center;gap:8px}
html body .sidebar .brand-row .brand{flex:1;min-width:0;display:flex;align-items:center}
html body .sidebar .wnav-word{min-width:0}
html body .sidebar .wnav-word :is(strong,small){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .sidebar .brand-row .collapse-btn{flex:none;margin-left:auto;position:static}
html body .topbar .greeting-mascot{display:none}
html body .sidebar .brand-row{min-height:0;margin:0 0 10px;padding:0 2px 6px}
html body .sidebar .brand-row .collapse-btn{width:30px;height:30px}
html body .sidebar .wnav-word small{font-size:10.5px}
/* --- Unificación de pantallas (v1.1) --- */
:root{--ix-ai:var(--primary);--ix-ai-50:var(--attention-icon-bg);--selection-terracotta:var(--primary)}
/* Pestañas (Automatización, Integraciones, Planes…) */
html body #main .tabs button{color:var(--text-subtle);font-weight:600;border-bottom:2px solid transparent;transition:color var(--ease),border-color var(--ease)}
html body #main .tabs button:hover{color:var(--primary)}
html body #main .tabs button.selected{color:var(--primary);border-bottom-color:var(--primary);font-weight:700}
/* Usuarios y roles */
html body #main .role-option,html body #main:has(.roles-layout) .role-option{border:0;border-radius:var(--r-row);background:var(--surface-soft);color:var(--text);box-shadow:none}
html body #main .role-option.selected,html body #main:has(.roles-layout) .role-option.selected{border:0;padding-left:14px;background:var(--attention-icon-bg);color:var(--primary);box-shadow:inset 3px 0 0 var(--primary)}
html body #main:has(.roles-layout) .role-option.selected small{color:var(--text-muted)}
html body #main:has(.roles-layout) .role-option .icon-tile,html body #main:has(.roles-layout) .role-option.selected .icon-tile{border-radius:var(--r-ctl);background:var(--surface);color:var(--primary)}
html body #main:has(.roles-layout) .role-picker{border:0;border-radius:var(--r-card);background:var(--surface);box-shadow:var(--shadow-card)}
html body #main:has(.team-tabs) .team-tabs{border-bottom:1px solid var(--line-soft)}
html body #main:has(.team-tabs) .team-tabs button{color:var(--text-subtle)}
html body #main:has(.team-tabs) .team-tabs button.selected{color:var(--primary);border-bottom-color:var(--primary)}
html body #main:has(.team-tabs) .team-tabs button:before,html body #main:has(.team-tabs) .team-tabs button.selected:before{border-radius:var(--r-ctl);background:var(--btn-soft);color:var(--primary)}
html body #main:has(.team-tabs) .team-tabs button>span:last-child,html body #main:has(.team-tabs) .team-tabs button.selected>span:last-child{border-radius:var(--r-pill);background:var(--gold);color:var(--on-gold);font-weight:800}
html body #main:has(.team-tabs) .page-heading>.btn{background:var(--gold);color:var(--on-gold);border-radius:var(--r-ctl);box-shadow:none;min-height:38px}
html body #main:has(.roles-layout) .permission-group{border:0;border-radius:var(--r-row);background:var(--surface-soft)}
html body #main:has(.roles-layout) .permission-group h3{background:transparent;color:var(--primary)}
html body #main:has(.roles-layout) .permission-group h3:before{border-radius:8px;background:var(--attention-icon-bg);box-shadow:none}
html body #main:has(.team-tabs) .info-card{background:var(--surface);border:0;border-radius:var(--r-card)}
html body #main:has(.team-tabs) .info-card>.icon{background:var(--info-icon-bg);color:var(--info-text);border-radius:var(--r-ctl)}
html body #main:has(.team-tabs) .user-status{background:var(--attention-icon-bg);color:var(--attention-text)}
html body #main:has(.team-tabs) .team-table th{background:transparent;color:var(--text-subtle);font-size:12px}
html body #main :is(input[role=switch]:checked){background:var(--primary)}
/* Cajas de búsqueda: el contenedor es el campo (sin doble recuadro) */
html body .search-field{min-height:40px;padding:0 12px;border:1px solid var(--input-border);border-radius:var(--r-ctl);background:var(--surface);color:var(--text-subtle);transition:box-shadow var(--ease),border-color var(--ease)}
html body .search-field:focus-within{border-color:var(--primary);box-shadow:0 0 0 2px var(--focus-ring)}
html body #main .search-field input,html body .crm-inbox-list .search-field input,html body .search-field input:focus{min-height:38px;border:0;border-radius:0;background:transparent;box-shadow:none;padding:0}
/* CRM 360° por dentro */
html body .ix-ai-btn{border-color:var(--line-soft);background:var(--attention-icon-bg);color:var(--primary)}
html body .ix-ai-btn:hover{background:var(--btn-soft-hover);border-color:var(--primary)}
html body .ix-ai-card{border-color:var(--line-soft);border-left-color:var(--primary);background:var(--surface-soft)}
html body .ix-ai-use{background:var(--gold);color:var(--on-gold)}
html body .crm-count-total{background:var(--primary);color:var(--on-primary);box-shadow:none}
html body .crm-count-new{background:var(--gold);color:var(--on-gold);border-color:var(--surface);outline-color:var(--gold);box-shadow:none}
html body .crm-count-new.is-zero{background:var(--btn-soft);color:var(--text-subtle);outline-color:var(--btn-soft)}
html body .crm-context-tabs button.selected,html body .crm-context-tabs span.selected{color:var(--primary);border-bottom-color:var(--primary)}
html body .crm-inbox-filters button{background:var(--surface-soft);color:var(--text-muted);border-radius:var(--r-pill)}
html body .crm-inbox-filters button.selected{background:var(--primary);color:var(--on-primary)}
html body.crm-inbox-active .support-toolbar [data-support="chat-create"]{background:var(--gold);color:var(--on-gold);box-shadow:none;border:0}
html body.crm-inbox-active .support-toolbar .btn{background:var(--btn-soft);color:var(--primary);border:0;border-radius:var(--r-ctl)}
html body.crm-inbox-active #main{background:var(--bg)}
html body .crm-inbox-shell{border-radius:var(--r-card);background:var(--surface);box-shadow:var(--shadow-card);border:0}
html body.crm-inbox-active .crm-chat-composer>.crm-send-button{background:var(--primary)!important;color:var(--on-primary)!important}
html body.crm-inbox-active .crm-conversation-item.selected{background:var(--attention-icon-bg)!important;box-shadow:inset 3px 0 0 var(--primary)!important}
/* Planes: plan destacado en petróleo con CTA dorado */
html body .panel.billing-plan-featured,html body .client-plans .plans-catalog .billing-plan-featured{background:var(--primary);border:0;border-radius:var(--r-card);box-shadow:var(--shadow-card);color:var(--on-primary)}
html body .client-plans .billing-plan-featured:before,html body .client-plans .billing-plan-featured:after{display:none}
html body .panel.billing-plan-featured>.btn.primary,html body .client-plans .plans-catalog .billing-plan-featured>.btn.primary{background:var(--gold);border:0;color:var(--on-gold);box-shadow:none}
html body .panel.billing-plan-featured>.btn.primary:hover,html body .client-plans .plans-catalog .billing-plan-featured>.btn.primary:hover{background:var(--gold-hover)}
html body .panel.billing-plan-featured .billing-featured-label{background:var(--gold);color:var(--on-gold);border-radius:var(--r-pill)}
html body .client-plans .billing-plan-featured .billing-annual-saving{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.14);color:var(--ring-fill)}
html body .client-plans .billing-plan-featured .billing-annual-saving:before{background:rgba(226,185,85,.16);color:var(--ring-fill)}
/* Errores con botón de reintento: secundario, no dorado */
html body #main :is(.error-state,.load-error,.panel-error,[role=alert]) .btn.primary{background:var(--btn-soft);color:var(--primary)}
html body #main .search-field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([role=switch]),html body #main label:has(input[data-crm-inbox="search"]) input:not([type=checkbox]):not([type=radio]):not([type=range]):not([role=switch]){min-height:38px;border:0;border-radius:0;background:transparent;box-shadow:none;padding:0}
html body #main .crm-inbox-list label:has(input[data-crm-inbox="search"]){border:1px solid var(--input-border)!important;border-radius:var(--r-ctl)!important;background:var(--surface)!important}
html body .client-plans .plans-catalog .billing-plan>.btn:not(.primary){background:var(--btn-soft);color:var(--primary);border:0;box-shadow:none}
html body .client-plans .plans-catalog .billing-plan>.btn:not(.primary):hover{background:var(--btn-soft-hover)}
html body .client-plans .billing-period-picker{background:var(--surface);border:0;border-radius:14px;box-shadow:var(--shadow-card)}
html body .client-plans .billing-period-picker button[aria-pressed=true]{background:var(--primary);color:var(--on-primary);box-shadow:none}
html body .client-plans .billing-period-picker button span{background:var(--urgent-icon-bg);color:var(--urgent-strong);border-radius:var(--r-pill)}
html body .client-plans .plans-catalog .billing-plan:not(.billing-plan-featured)>.btn{background:var(--btn-soft);color:var(--primary);border:0;box-shadow:none}
html body .client-plans .plans-catalog .billing-plan:not(.billing-plan-featured)>.btn:hover{background:var(--btn-soft-hover);color:var(--primary)}
html body .sidebar .sidebar-profile small{display:flex;align-items:center;gap:5px}
html body .sidebar .wnav-crown{width:13px;height:13px;flex:none;color:var(--gold)}
/* Pestaña de contraer/expandir en el borde del menú */
html body .sidebar,html body.sidebar-collapsed .sidebar{overflow:visible}
html body .sidebar .wnav-toggle,html body.sidebar-collapsed .sidebar .wnav-toggle{position:absolute;top:32px;right:-14px;left:auto;z-index:5;display:grid;place-items:center;width:28px;height:28px;min-height:0;margin:0;padding:0;border:0;border-radius:50%;background:var(--surface);color:var(--primary);box-shadow:0 1px 4px rgba(16,41,47,.18);cursor:pointer;animation:none;transition:background var(--ease),transform var(--ease)}
html body .sidebar .wnav-toggle:hover{background:var(--gold);color:var(--on-gold)}
html body .sidebar .wnav-toggle svg{transition:transform var(--ease)}
html body.sidebar-collapsed .sidebar .wnav-toggle svg{transform:rotate(180deg)}
html body .sidebar .wnav-toggle:focus-visible{box-shadow:0 0 0 3px var(--focus-ring)}
html body.sidebar-collapsed .sidebar .brand-row{justify-content:center;flex-direction:row}
html body.sidebar-collapsed .sidebar .brand-row .brand{flex:0 0 auto;width:auto}
@media (max-width:1023px){html body .sidebar .wnav-toggle{display:none}}
html body.sidebar-collapsed .sidebar .wnav-live{position:absolute;top:9px;right:12px;margin:0}
/* Barra superior */
html body .topbar{display:flex;align-items:center;justify-content:space-between;gap:16px}
html body .topbar .greeting{display:flex;align-items:center;gap:14px}
html body .topbar .greeting strong#greeting-name{font-size:16px;font-weight:800;letter-spacing:-.01em;color:var(--text)}
html body .topbar .greeting>div:not(.plan-expiry):not(.greeting-mascot) span{font-size:13px;color:var(--text-muted)}
html body .topbar .wbar-plan:not([hidden]){display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 14px;border-radius:var(--r-pill);background:var(--surface);box-shadow:var(--shadow-card);border:0}
html body .topbar .wbar-plan span{font-size:12px;font-weight:600;color:var(--text-subtle)}
html body .topbar .wbar-plan strong{font-size:13px;font-weight:700;color:var(--primary)}
html body .topbar .greeting .topbar-divider,html body .topbar .plan-expiry:before{display:none}
html body .topbar .topbar-actions{display:flex;align-items:center;gap:10px}
html body .topbar .preview-badge,html body .topbar .topbar-actions .topbar-divider{display:none}
html body .topbar .topbar-actions .icon-btn{display:grid;place-items:center;width:42px;height:42px;padding:0;border-radius:var(--r-ctl);background:var(--surface);color:var(--primary);border:0;box-shadow:var(--shadow-card)}
html body .topbar .topbar-actions .icon-btn:hover{background:var(--surface-soft)}
html body .topbar .topbar-actions .avatar{width:42px;height:42px;min-width:42px;border-radius:50%;border:0;box-shadow:var(--shadow-card);overflow:hidden}
html body .wbar-bell-wrap{position:relative}
html body .wbar-btn{position:relative}
html body .wbar-count{position:absolute;top:-5px;right:-5px;min-width:19px;height:19px;padding:0 5px;display:grid;place-items:center;border-radius:var(--r-pill);background:var(--gold);color:var(--on-gold);font:800 11px var(--font);box-shadow:0 0 0 2px var(--bg)}
html body .wbar-panel{position:absolute;top:50px;right:0;z-index:60;width:min(380px,calc(100vw - 32px));max-height:min(520px,70vh);display:flex;flex-direction:column;background:var(--surface);border-radius:var(--r-card);box-shadow:0 18px 40px rgba(10,63,74,.18);overflow:hidden}
html body .wbar-panel[hidden]{display:none}
html body .wbar-panel header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 18px 10px}
html body .wbar-panel header strong{font-size:15px;font-weight:800;color:var(--text)}
html body .wbar-link{border:0;background:none;padding:0;color:var(--primary);font:700 12px var(--font);cursor:pointer}
html body .wbar-link:hover{text-decoration:underline}
html body .wbar-panel ul{list-style:none;margin:0;padding:0 8px;overflow:auto}
html body .wbar-item{display:flex;gap:10px;width:100%;padding:10px;border:0;border-radius:var(--r-row);background:transparent;text-align:left;cursor:pointer;transition:background var(--ease)}
html body .wbar-item:hover{background:var(--surface-soft)}
html body .wbar-dot{flex:none;width:8px;height:8px;margin-top:6px;border-radius:50%;background:transparent}
html body .wbar-item.unread .wbar-dot{background:var(--gold)}
html body .wbar-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
html body .wbar-copy strong{font-size:13px;font-weight:600;color:var(--text-muted)}
html body .wbar-item.unread .wbar-copy strong{font-weight:800;color:var(--text)}
html body .wbar-copy small{font-size:12px;color:var(--text-muted);overflow-wrap:anywhere}
html body .wbar-copy em{font-style:normal;font-size:11px;color:var(--text-subtle)}
html body .wbar-empty{margin:8px 18px 16px;color:var(--text-muted);font-size:13px}
html body .wbar-panel footer{padding:10px 18px 14px;border-top:1px solid var(--line-soft)}
html body .wbar-panel footer a{color:var(--primary);font-weight:700;font-size:13px;text-decoration:none}
@media (max-width:760px){html body .topbar .wbar-plan,html body .topbar .greeting>div:not(.plan-expiry):not(.greeting-mascot) span{display:none}html body .topbar .topbar-actions{gap:6px}html body .topbar .topbar-actions .icon-btn{width:38px;height:38px}}
html body .topbar .wbar-plan:not([hidden]){flex-direction:row;white-space:nowrap}
html body .topbar .wbar-plan:not([hidden])>*{display:inline;margin:0}
@media (max-width:1100px){html body .topbar .wbar-plan:not([hidden]) span{display:none}}
@media (max-width:760px){html body .topbar .wbar-plan:not([hidden]),html body .topbar .greeting>div:not(.plan-expiry):not(.greeting-mascot) span{display:none}}
/* Mascota (solo si el usuario la activa) */
html body .topbar .greeting-mascot{display:none}
html body.wm-enabled .topbar .greeting-mascot{display:block;position:relative;flex:none;width:56px;height:64px;margin-right:4px;background:none;border:0;filter:none}
html body .wm{position:relative;width:56px;height:64px}
html body .wm-bot{position:relative;display:block;width:56px;height:64px;padding:0;border:0;background:none;cursor:pointer;animation:wm-float 3.2s ease-in-out infinite}
html body .wm-bot:focus-visible{outline:none;box-shadow:0 0 0 2px var(--focus-ring);border-radius:var(--r-ctl)}
html body .wm-bot>img,html body .wm-head{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
html body .wm-head img{width:100%;height:100%}
html body .wm-arm-l{transform-origin:20.4% 52.3%}
html body .wm-arm-r{transform-origin:79.6% 52.3%}
html body .wm-head{transform-origin:50% 46.3%}
html body .wm-lid{position:absolute;top:21%;width:13%;height:8%;border-radius:40%;background:#000f11;transform:scaleY(0);transform-origin:50% 0;transition:transform 70ms ease}
html body .wm-lid-l{left:31.5%}
html body .wm-lid-r{left:55.5%}
html body .wm.wm-blinking .wm-lid{transform:scaleY(1)}
html body .wm.wm-wave .wm-arm-r{animation:wm-wave .45s ease-in-out 3}
html body .wm.wm-wave .wm-head{animation:wm-tilt 1.4s ease-in-out}
html body .wm.wm-cheer .wm-arm-r{animation:wm-wave .4s ease-in-out 4}
html body .wm.wm-cheer .wm-arm-l{animation:wm-wave-l .4s ease-in-out 4}
html body .wm.wm-cheer .wm-bot{animation:wm-hop .5s ease-in-out 3}
html body .wm.wm-jump .wm-bot{animation:wm-spin 1.1s ease-in-out}
html body .wm.wm-jump .wm-arm-r{animation:wm-wave .35s ease-in-out 4}
html body .wm.wm-jump .wm-arm-l{animation:wm-wave-l .35s ease-in-out 4}
html body .wm[data-level="2"] .wm-bot{animation-duration:2.6s}
html body .wm[data-level="3"] .wm-bot{animation-duration:2s}
html body .wm.wm-quiet .wm-bot{animation:none}
@keyframes wm-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@keyframes wm-wave{0%,100%{transform:rotate(0)}50%{transform:rotate(-38deg)}}
@keyframes wm-wave-l{0%,100%{transform:rotate(0)}50%{transform:rotate(30deg)}}
@keyframes wm-tilt{0%,100%{transform:rotate(0)}30%{transform:rotate(-8deg)}70%{transform:rotate(6deg)}}
@keyframes wm-hop{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
@keyframes wm-spin{0%{transform:translateY(0) rotate(0)}40%{transform:translateY(-8px) rotate(-10deg)}70%{transform:translateY(-4px) rotate(8deg)}100%{transform:translateY(0) rotate(0)}}
html body .wm-bubble{position:absolute;top:calc(100% + 8px);left:4px;z-index:70;width:max-content;max-width:min(340px,calc(100vw - 40px));padding:12px 14px;border-radius:var(--r-row);background:var(--surface);box-shadow:0 12px 30px rgba(10,63,74,.16);color:var(--text);cursor:default}
html body .wm-bubble:before{content:'';position:absolute;top:-6px;left:22px;width:12px;height:12px;background:inherit;transform:rotate(45deg);border-radius:2px}
html body .wm-bubble p{position:relative;margin:0;font-size:13px;font-weight:600;line-height:1.45}
html body .wm-bubble small{position:relative;display:block;margin-top:4px;font-size:12px;font-weight:700;color:var(--primary)}
html body .wm-bubble small:empty{display:none}
html body .wm-bubble.wm-alert{background:var(--urgent-bg);color:var(--urgent-strong);cursor:pointer;box-shadow:0 12px 30px rgba(134,98,26,.2),0 0 0 2px var(--gold)}
html body .wm-bubble.wm-in{animation:wm-pop .35s cubic-bezier(.2,.9,.3,1.3)}
@keyframes wm-pop{0%{opacity:0;transform:translateY(-6px) scale(.9)}100%{opacity:1;transform:none}}
html body .topbar .wm-toggle[aria-pressed="true"]{background:var(--attention-icon-bg);color:var(--primary)}
@media (max-width:760px){html body.wm-enabled .topbar .greeting-mascot,html body .wm,html body .wm-bot{width:40px;height:46px}html body .wm-bubble{left:-8px;max-width:calc(100vw - 32px)}}
@media (prefers-reduced-motion:reduce){html body .wm *,html body .wm{animation:none!important;transition:none!important}}
@media (max-width:760px){
 html body.wm-enabled .topbar .greeting>div:not(.greeting-mascot):not(.plan-expiry){display:none}
 html body .wm-bubble{position:fixed;top:72px;left:16px;right:16px;width:auto;max-width:none}
 html body .wm-bubble:before{left:52px}
}
/* v1.6 — separación del contenido y contraer/expandir sin saltos */
:root{--ob-gap-content:40px;--ob-slide:250ms cubic-bezier(.2,.8,.2,1)}
html body .app-shell{margin-left:calc(var(--ob-sidebar-w) + var(--layout-pad) + var(--ob-gap-content))}
html body.sidebar-collapsed .app-shell{margin-left:calc(var(--ob-rail-w) + var(--layout-pad) + var(--ob-gap-content))}
html body .app-shell,html body.crm-inbox-active .app-shell{transition:margin-left var(--ob-slide)}
html body .sidebar{transition:width var(--ob-slide),padding var(--ob-slide)}
html body.sidebar-collapsed .sidebar{padding:18px 14px 12px}
html body .sidebar .nav-link{white-space:nowrap;overflow:hidden;justify-content:flex-start;padding:0 12px}
html body.sidebar-collapsed .sidebar .nav-link{justify-content:flex-start;padding:0 12px}
html body .sidebar :is(.nav-label,.nav-heading,.wnav-word,.wnav-count,.wnav-search input,.sidebar-profile>span:not(.mini-avatar),.sidebar-profile>.icon,.wnav-soon .nav-chevron){transition:opacity 160ms ease}
html body.sidebar-collapsed .sidebar :is(.nav-label,.nav-heading,.wnav-word,.wnav-count,.wnav-search input,.sidebar-profile>span:not(.mini-avatar),.sidebar-profile>.icon,.wnav-soon .nav-chevron){display:revert;opacity:0;pointer-events:none}
html body.sidebar-collapsed .sidebar .nav-heading{display:block;white-space:nowrap;overflow:hidden}
html body.sidebar-collapsed .sidebar .wnav-search{display:flex;overflow:hidden;cursor:pointer}
html body.sidebar-collapsed .sidebar .wnav-word{display:flex}
html body.sidebar-collapsed .sidebar .brand-row{justify-content:flex-start;flex-direction:row;padding:0 0 6px}
html body.sidebar-collapsed .sidebar .brand-row .brand{flex:1;min-width:0;overflow:hidden}
html body.sidebar-collapsed .sidebar .sidebar-profile{overflow:hidden;white-space:nowrap}
html body .sidebar .sidebar-profile .mini-avatar{flex:none}
@media (min-width:761px) and (max-width:1023px){html body .app-shell,html body.sidebar-collapsed .app-shell{margin-left:calc(var(--ob-rail-w) + var(--layout-pad) + 24px)}}
@media (max-width:760px){html body .app-shell,html body.sidebar-collapsed .app-shell{margin-left:0}}
@media (prefers-reduced-motion:reduce){html body .sidebar,html body .app-shell{transition:none}}
html body .sidebar .brand-row,html body.sidebar-collapsed .sidebar .brand-row{margin:0 0 10px!important;padding:0 2px 6px!important;gap:8px!important;flex-direction:row!important;align-items:center!important}
html body .sidebar .brand-row .brand,html body.sidebar-collapsed .sidebar .brand-row .brand{height:46px!important;margin:0!important;padding:0!important;width:auto!important}
html body.sidebar-collapsed .sidebar .wnav-search{display:flex!important}
html body.sidebar-collapsed .sidebar :is(.nav-label,.nav-heading,.wnav-word,.wnav-count,.wnav-soon .nav-chevron){display:revert!important}
html body.sidebar-collapsed .sidebar .nav-heading,html body.sidebar-collapsed .sidebar .wnav-word{display:block!important}
html body.sidebar-collapsed .sidebar .wnav-word{display:flex!important}
html body .sidebar .brand-row .brand,html body.sidebar-collapsed .sidebar .brand-row .brand{min-height:46px!important;max-height:46px}
/* v1.7 — coreografía de contraer/expandir y barra sin título de CRM */
html body .topbar .crm-topbar-title{display:none!important}
:root{--ob-ease:cubic-bezier(.4,0,.2,1)}
/* Expandir (estado base): primero el ancho, luego aparecen los textos */
html body .sidebar{transition:width 240ms var(--ob-ease),padding 240ms var(--ob-ease);will-change:width}
html body .app-shell,html body.crm-inbox-active .app-shell{transition:margin-left 240ms var(--ob-ease);will-change:margin-left}
html body .sidebar :is(.nav-label,.nav-heading,.wnav-word,.wnav-count,.wnav-search input,.sidebar-profile>span:not(.mini-avatar),.sidebar-profile>.icon,.wnav-soon .nav-chevron,.wnav-live){transition:opacity 180ms ease 170ms}
/* Contraer: primero se desvanecen los textos, luego se estrecha */
html body.sidebar-collapsed .sidebar{transition:width 240ms var(--ob-ease) 80ms,padding 240ms var(--ob-ease) 80ms}
html body.sidebar-collapsed .app-shell{transition:margin-left 240ms var(--ob-ease) 80ms}
html body.sidebar-collapsed .sidebar :is(.nav-label,.nav-heading,.wnav-word,.wnav-count,.wnav-search input,.sidebar-profile>span:not(.mini-avatar),.sidebar-profile>.icon,.wnav-soon .nav-chevron){transition:opacity 90ms ease 0s}
html body .sidebar :is(.wnav-word,.wnav-word *,.nav-heading,.sidebar-profile *){white-space:nowrap}
html body .topbar .wbar-plan{white-space:nowrap}
@media (prefers-reduced-motion:reduce){html body .sidebar,html body .app-shell,html body .sidebar *{transition:none!important}}
/* v1.8 — el contenido ya no anima el margen (FLIP con transform desde nav-whalybot.js) */
html body .app-shell,html body.sidebar-collapsed .app-shell,html body.crm-inbox-active .app-shell{transition:none;will-change:auto}
html body .app-shell.wnav-flip{will-change:transform}
html,html body{overflow-x:clip}
/* CRM 360°: el navegador no calcula lo que está fuera de pantalla */
html body .crm-conversation-items>.crm-conversation-item{content-visibility:auto;contain-intrinsic-size:auto 76px}
