:root{--inicio:#EAB308;--inicio-soft:#FEF9C3;--clientes:#F28C28;--clientes-soft:#FFF3E6;--dia:#3498DB;--dia-soft:#EAF5FC;--carteras:#20A464;--carteras-soft:#E8F7EF;--usuarios:#9B59B6;--usuarios-soft:#F4EBF8;--alerta:#E45454;--alerta-soft:#FDECEC;--app:#F3F6F8;--card:#fff;--text:#24313D;--muted:#6B7785;--line:#DDE4E8}*{box-sizing:border-box}body{margin:0;background:var(--app)!important;color:var(--text)!important;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif!important}
/* Navigation: fixed geometry prevents active items from shifting. */
.crm-topbar{position:fixed;inset:0 auto 0 0;width:244px;min-height:100vh;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;padding:22px 14px;background:#fff!important;border:0;border-right:1px solid var(--line)!important;box-shadow:8px 0 28px rgba(36,49,61,.035);z-index:30}.crm-brand{display:flex;align-items:center;gap:10px;padding:2px 8px;color:#18734a!important;text-decoration:none;font-size:18px!important;font-weight:800;letter-spacing:-.03em}.crm-brand em{font-style:normal;font-weight:500;color:#8b9991}.crm-brand-mark{display:grid;place-items:center;width:31px;height:31px;flex:0 0 31px;border-radius:10px;background:#20A464;color:#fff;font-size:17px}.crm-context{margin:12px 9px 22px;color:#8a9991;font-size:11px;font-weight:750;letter-spacing:.09em;text-transform:uppercase}.crm-nav{display:flex!important;flex-direction:column;gap:4px!important;width:100%!important;margin:0;padding:0}.crm-nav a{display:flex!important;align-items:center!important;gap:12px!important;min-height:48px;width:100%;padding:10px 11px!important;border-radius:10px;color:#5b6d63!important;text-decoration:none;font-size:14px!important;font-weight:650!important;transition:background .16s ease,color .16s ease}.crm-nav a:hover{background:var(--nav-soft)!important;color:var(--nav)!important}.crm-nav a.activo{background:var(--nav-soft)!important;color:var(--nav)!important;font-weight:780!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--nav) 18%,white)}.crm-nav a.mod-inicio{--nav:var(--inicio);--nav-soft:var(--inicio-soft)}.crm-nav a.mod-clientes{--nav:var(--clientes);--nav-soft:var(--clientes-soft)}.crm-nav a.mod-dia{--nav:var(--dia);--nav-soft:var(--dia-soft)}.crm-nav a.mod-carteras{--nav:var(--carteras);--nav-soft:var(--carteras-soft)}.crm-nav a.mod-usuarios{--nav:var(--usuarios);--nav-soft:var(--usuarios-soft)}.crm-nav-icon{display:grid!important;place-items:center!important;width:28px!important;height:28px!important;flex:0 0 28px!important;font-size:21px!important;line-height:1!important;color:currentColor}.crm-user{display:flex!important;align-items:center!important;gap:10px!important;margin:auto 7px 4px!important;padding:13px 8px!important;border-top:1px solid #e7edef;text-align:left!important;color:#2c4136}.crm-avatar{display:grid!important;place-items:center!important;width:36px!important;height:36px!important;flex:0 0 36px!important;border-radius:50%!important;background:var(--carteras-soft);color:#15804a;font-size:14px;font-weight:800}.crm-user>span:last-child{display:block!important;min-width:0}.crm-user strong{display:block;line-height:1.2;font-size:13px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-user small{display:block!important;margin:3px 0 0!important;color:var(--muted);font-size:11px;line-height:1.25}
/* Content always begins at the top of the main area. */
.crm-page{min-height:100vh;margin-left:244px;padding:32px 36px 48px;background:var(--app)}.crm-page .contenedor{width:min(100%,1320px)!important;margin:0 auto!important;padding:0!important}.crm-page h1{margin:0 0 10px!important;color:var(--text);font-size:clamp(25px,2.5vw,32px)!important;line-height:1.2!important;letter-spacing:-.035em}.crm-page h2{margin:0 0 14px!important;font-size:18px!important;line-height:1.25}.crm-page .subtitulo{margin:0!important;color:var(--muted)!important;font-size:14px!important;line-height:1.5}.crm-page .encabezado,.crm-page .panel,.crm-page .tarjeta{background:var(--card)!important;border:1px solid var(--line)!important;border-radius:15px!important;box-shadow:0 5px 16px rgba(36,49,61,.045)}.crm-page .encabezado,.crm-page .panel{margin-bottom:16px!important;padding:20px!important}.crm-page .encabezado{border-top:4px solid var(--module,#DDE4E8)!important}.crm-page .tarjeta{padding:16px!important}.crm-page .tarjetas,.crm-card-grid{gap:14px!important}.crm-page .panel h2{display:flex;align-items:center;gap:10px}.crm-page .panel h2:before{content:"";width:6px;height:20px;flex:0 0 6px;border-radius:99px;background:var(--module,#20A464)}
.crm-module-inicio{--module:var(--inicio);--module-soft:var(--inicio-soft)}.crm-module-clientes{--module:var(--clientes);--module-soft:var(--clientes-soft)}.crm-module-dia{--module:var(--dia);--module-soft:var(--dia-soft)}.crm-module-carteras{--module:var(--carteras);--module-soft:var(--carteras-soft)}.crm-module-usuarios{--module:var(--usuarios);--module-soft:var(--usuarios-soft)}.crm-module-clientes h1:before,.crm-module-dia h1:before,.crm-module-carteras h1:before,.crm-module-usuarios h1:before{display:inline-grid;place-items:center;width:44px;height:44px;margin-right:12px;border-radius:13px;background:var(--module-soft);color:var(--module);font-size:25px;vertical-align:middle}.crm-module-clientes h1:before{content:"⌕"}.crm-module-dia h1:before{content:"✓"}.crm-module-carteras h1:before{content:"▣"}.crm-module-usuarios h1:before{content:"♙"}
/* Controls and common components. */
.crm-page input,.crm-page select,.crm-page textarea{min-height:43px!important;height:43px;border:1px solid #cfd9de!important;border-radius:9px!important;background:#fff!important;color:var(--text)!important;font:inherit}.crm-page textarea{height:auto;min-height:96px!important}.crm-page input:focus,.crm-page select:focus,.crm-page textarea:focus{outline:3px solid var(--module-soft)!important;border-color:var(--module)!important}.crm-page button,.crm-page .boton{display:inline-flex;align-items:center;justify-content:center;min-height:43px!important;padding:10px 14px!important;border:0;border-radius:9px!important;background:var(--module,#20A464)!important;color:#fff!important;font-weight:750!important;text-decoration:none;cursor:pointer}.crm-page .secundario,.crm-page .boton-secundario{background:#fff!important;color:#4e6069!important;border:1px solid #cfd9de!important}.crm-page .filtros{gap:12px!important;align-items:end!important}.crm-form{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr)) auto;gap:10px;align-items:center}.crm-form label{display:flex!important;align-items:center!important;min-height:43px;margin:0!important;white-space:nowrap}.crm-form label input{min-height:0!important;height:auto!important;margin:0 7px 0 0}.crm-page .tabla-scroll{border:1px solid #e2e9ec;border-radius:11px}.crm-page table{width:100%;font-size:13px}.crm-page th{background:#f6f8f9!important;color:#64737c!important;font-size:11px;text-transform:uppercase;letter-spacing:.04em}.crm-page th,.crm-page td{padding:12px 11px!important;border-color:#e5eaed!important;vertical-align:middle}.crm-page tr:hover td{background:#fafcfc!important}.crm-page .estado{border-radius:999px!important;padding:5px 9px!important;font-size:11px;font-weight:750}.crm-page .estado-activo{background:var(--carteras-soft)!important;color:#15804a!important}.crm-page .estado-alerta{background:var(--inicio-soft)!important;color:#947000!important}.crm-page .estado-riesgo{background:var(--alerta-soft)!important;color:#c34040!important}.crm-empty{padding:32px!important;text-align:center;border:1px dashed #bcd7c7!important;border-radius:13px;background:#fff;color:var(--muted)}.crm-ok{padding:11px 13px;border:1px solid #bee3c8;border-radius:9px;background:var(--carteras-soft);color:#17663a}.crm-error,.crm-page .error{padding:11px 13px;border:1px solid #f0c5bf;border-radius:9px;background:var(--alerta-soft);color:#8b3027}
/* Dashboard and working cards. */
.crm-dashboard-module{position:relative;min-height:194px;padding:20px!important;overflow:hidden;border-top:4px solid var(--module)!important;transition:transform .18s ease,box-shadow .18s ease}.crm-dashboard-module:hover{transform:translateY(-3px);box-shadow:0 10px 23px rgba(36,49,61,.1)!important}.crm-dashboard-module .crm-module-icon{display:grid;place-items:center;width:52px;height:52px;margin-bottom:15px;border-radius:16px;background:var(--module-soft);color:var(--module);font-size:30px;font-weight:800}.crm-dashboard-module strong{display:block;margin-bottom:6px;color:var(--module);font-size:19px}.crm-dashboard-module:after{content:"→";position:absolute;right:18px;bottom:14px;color:var(--module);font-size:22px}.crm-dashboard-module.mod-inicio{--module:var(--inicio);--module-soft:var(--inicio-soft)}.crm-dashboard-module.mod-clientes{--module:var(--clientes);--module-soft:var(--clientes-soft)}.crm-dashboard-module.mod-dia{--module:var(--dia);--module-soft:var(--dia-soft)}.crm-dashboard-module.mod-carteras{--module:var(--carteras);--module-soft:var(--carteras-soft)}.crm-dashboard-module.mod-usuarios{--module:var(--usuarios);--module-soft:var(--usuarios-soft)}.crm-dashboard-module.mod-alerta{--module:var(--alerta);--module-soft:var(--alerta-soft)}.crm-page .actividad{border:1px solid var(--line)!important;border-radius:13px!important;background:#fff!important;box-shadow:0 3px 11px rgba(36,49,61,.04)}.crm-page .actividad-pendiente{border-left:4px solid var(--alerta)!important;background:var(--alerta-soft)!important}.crm-page .actividad-realizada{border-left:4px solid var(--carteras)!important}.crm-page .actividad .cliente{font-weight:800;font-size:15px}.crm-section-nav{display:flex;gap:8px;overflow-x:auto;margin:0 0 18px;padding:3px 0}.crm-section-nav a{display:inline-flex;align-items:center;flex:0 0 auto;padding:9px 13px;border:1px solid;border-radius:10px;text-decoration:none;font-size:12px;font-weight:750}.crm-section-nav a:nth-child(1){background:var(--inicio-soft);border-color:#f5dfa0;color:#987400}.crm-section-nav a:nth-child(2){background:var(--dia-soft);border-color:#b9ddf2;color:#257ab1}.crm-section-nav a:nth-child(3){background:var(--carteras-soft);border-color:#bde7ce;color:#16824c}.crm-section-nav a:nth-child(4){background:var(--clientes-soft);border-color:#f6c995;color:#bd6410}.crm-vendedor .dato-margen{display:none!important}
@media(max-width:1024px){.crm-topbar{width:210px}.crm-page{margin-left:210px;padding:32px 28px}.crm-page .contenedor{max-width:960px}.crm-form{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:768px){.crm-topbar{position:sticky;top:0;width:100%;min-height:auto;flex-direction:row;align-items:center;padding:9px 12px!important;border-right:0!important;border-bottom:1px solid var(--line)!important;box-shadow:0 2px 14px rgba(36,49,61,.08)}.crm-context{display:none}.crm-brand{padding:0!important;font-size:16px!important}.crm-brand-mark{width:28px;height:28px;flex-basis:28px}.crm-nav{order:3;flex-direction:row;gap:3px!important;overflow-x:auto;width:100%!important;margin-top:7px}.crm-nav a{min-height:38px;width:auto;padding:7px 10px!important;gap:6px!important;font-size:12px!important;white-space:nowrap}.crm-nav-icon{width:20px!important;height:20px!important;flex-basis:20px!important;font-size:17px!important}.crm-user{margin:0 0 0 auto!important;padding:0 0 0 8px!important;border:0}.crm-avatar{width:30px!important;height:30px!important;flex-basis:30px!important}.crm-user strong{max-width:88px}.crm-page{margin-left:0;padding:24px 12px 32px}.crm-page .contenedor{width:100%!important}.crm-page .encabezado,.crm-page .panel{padding:16px!important;margin-bottom:16px!important}.crm-page .tarjetas,.crm-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.crm-page .filtros,.crm-form{grid-template-columns:1fr!important}.crm-dashboard-module{min-height:174px}.crm-dashboard-module .crm-module-icon{width:48px;height:48px;font-size:27px}.cartera-table,.cartera-table tbody,.cartera-table tr,.cartera-table td{display:block!important;width:100%!important}.cartera-table thead{display:none}.cartera-table tr{padding:14px;border-bottom:1px solid var(--line)}.cartera-table td{display:grid!important;grid-template-columns:44% 56%;padding:7px 0!important;border:0!important}.cartera-table td:before{font-size:11px;font-weight:750;text-transform:uppercase;color:var(--muted)}.cartera-table td:nth-child(1):before{content:"Cliente"}.cartera-table td:nth-child(2):before{content:"RUT"}.cartera-table td:nth-child(3):before{content:"Última compra"}.cartera-table td:nth-child(4):before{content:"Días sin compra"}.cartera-table td:nth-child(5):before{content:"Seguimiento"}.cartera-table td:nth-child(6){display:block!important;padding-top:10px!important}.cartera-table td:nth-child(6) a{display:inline-flex;padding:8px 11px;border-radius:8px;background:var(--carteras-soft);color:#16824c;text-decoration:none;font-weight:750}}@media(max-width:420px){.crm-page .tarjetas,.crm-card-grid{grid-template-columns:1fr!important}.crm-page h1{font-size:25px!important}.crm-user small{display:none!important}}
/* Direct CRM authentication. */
.crm-auth-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(145deg,#edf6f1 0%,#f4f7f8 48%,#f7f3fb 100%)!important}.crm-auth-card{width:min(100%,430px);padding:38px;border:1px solid #dce6e1;border-radius:18px;background:#fff;box-shadow:0 20px 52px rgba(36,49,61,.12)}.crm-auth-brand{display:flex;align-items:center;gap:10px;color:#18734a;font-size:20px}.crm-auth-brand>span{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#20A464;color:#fff;font-weight:800}.crm-auth-brand em{font-style:normal;font-weight:500;color:#8b9991}.crm-auth-card h1{margin:30px 0 7px;font-size:26px;letter-spacing:-.03em}.crm-auth-card>p{margin:0 0 24px;color:var(--muted)}.crm-auth-form{display:grid;gap:16px}.crm-auth-form label{display:grid;gap:7px;color:#43525b;font-size:13px;font-weight:750}.crm-auth-form input{width:100%;min-height:46px;padding:10px 12px;border:1px solid #cfd9de;border-radius:9px;background:#fff;color:var(--text);font:inherit}.crm-auth-form input:focus{outline:3px solid var(--carteras-soft);border-color:var(--carteras)}.crm-auth-form button{min-height:46px;margin-top:5px;border:0;border-radius:9px;background:#20A464;color:#fff;font:750 14px inherit;cursor:pointer}.crm-auth-form button:hover{background:#187d4e}.crm-auth-error{margin:0 0 18px;padding:11px 13px;border:1px solid #f0c5bf;border-radius:9px;background:var(--alerta-soft);color:#8b3027;font-size:13px}.crm-user-create{grid-template-columns:repeat(4,minmax(130px,1fr))!important}.crm-user-actions{min-width:320px}.crm-user-actions summary{cursor:pointer;color:#18734a;font-weight:750}.crm-user-edit,.crm-user-reset{display:grid;gap:8px;margin-top:12px}.crm-user-edit label{display:grid;gap:4px;font-size:12px;font-weight:700}.crm-user-edit input,.crm-user-edit select,.crm-user-reset input{min-height:38px!important;height:38px!important;padding:7px}.crm-user-edit label:last-of-type{display:flex;align-items:center;gap:6px}.crm-user-edit label:last-of-type input{min-height:auto!important;height:auto!important}.crm-user-reset{padding-top:12px;border-top:1px solid var(--line)}@media(max-width:768px){.crm-auth-page{padding:16px}.crm-auth-card{padding:28px 22px}.crm-user-create{grid-template-columns:1fr!important}.crm-user-actions{min-width:260px}}
.crm-password-field{position:relative;display:flex;align-items:stretch;width:100%}.crm-password-field input{padding-right:104px!important}.crm-password-toggle{position:absolute!important;right:4px;top:4px;bottom:4px;min-height:0!important;margin:0!important;padding:0 10px!important;border:0!important;border-radius:7px!important;background:#edf3ef!important;color:#18734a!important;font-size:12px!important;font-weight:750!important;cursor:pointer}.crm-password-toggle span[aria-hidden]{font-size:16px;margin-right:4px}.crm-auth-form .crm-password-field input{min-height:52px}.crm-auth-form .crm-password-toggle{top:5px;bottom:5px}.crm-auth-help{margin-top:-12px!important;font-size:13px;line-height:1.45}.crm-user-create label,.crm-user-reset label{display:grid;gap:5px;font-size:12px;font-weight:750}.crm-user-create input,.crm-user-create select{min-height:43px!important;height:43px!important;padding:8px}.crm-user-create .crm-password-field input,.crm-user-reset .crm-password-field input{padding-right:96px!important}.crm-password-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.crm-password-actions button{min-height:40px!important}.crm-user-edit small{color:var(--muted);font-size:11px;line-height:1.35}@media(max-width:768px){.crm-password-toggle{font-size:13px!important;padding:0 12px!important}.crm-auth-form .crm-password-field input{min-height:56px}}
/* Responsive finish: preserve the desktop information hierarchy while making the working screens comfortable on a phone. */
.crm-auth-brand-wordmark{display:inline-flex;align-items:baseline;gap:0;color:#18734a;font-size:22px;font-weight:820;letter-spacing:-.055em}.crm-auth-brand-wordmark span{font-weight:500;color:#5b6d63}.crm-auth-brand-wordmark small{margin-left:8px;color:#8b9991;font-size:12px;font-weight:750;letter-spacing:.08em;text-transform:uppercase}.crm-auth-logo{display:flex;align-items:center;justify-content:center;min-width:48px;height:48px;padding:0 12px;border:1px solid #cce7d8;border-radius:13px;background:#f2faf5;color:#18734a}.crm-auth-card .crm-auth-brand{justify-content:center;gap:12px}.crm-auth-card .crm-auth-brand>span:not(.crm-auth-logo){display:none}.crm-auth-card .crm-auth-brand strong{font-weight:800}.crm-auth-card .crm-auth-brand em{font-style:normal;font-weight:500;color:#7d8c84}.crm-auth-card .crm-auth-link{display:block;margin-top:22px;text-align:center;font-size:15px;font-weight:750;color:#18734a}.crm-auth-card .crm-auth-link-prominent{padding:12px;border:1px solid #b9ddc8;border-radius:9px;background:#f0f8f3;text-decoration:none}.crm-auth-ok{margin:0 0 18px;padding:11px 13px;border:1px solid #bee3c8;border-radius:9px;background:var(--carteras-soft);color:#17663a;font-size:13px}.crm-auth-card h1{text-align:center}.crm-auth-card>p{text-align:center}.crm-auth-form button[type=submit]{font-size:16px}.crm-auth-form label{font-size:14px}.crm-auth-form input{font-size:16px}.crm-page .tabla-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.crm-page .tabla-scroll table{min-width:680px}.crm-page .tabla-scroll::-webkit-scrollbar{height:8px}.crm-page .tabla-scroll::-webkit-scrollbar-thumb{border-radius:8px;background:#c7d2d7}.crm-page .tarjetas{align-items:stretch}.crm-page .tarjetas .tarjeta{min-width:0}.crm-page .fila-encabezado{gap:16px}.crm-page .fila-encabezado .boton{flex:0 0 auto}.crm-page .actividad{padding:16px!important}.crm-page .actividad-cabecera{gap:12px}.crm-page .actividad-meta{line-height:1.55}.crm-page .form-grid label{font-weight:700;color:#43525b}.crm-page .form-grid input,.crm-page .form-grid select,.crm-page .form-grid textarea{width:100%}.crm-page .resumen-tabla{gap:8px}
@media(max-width:768px){.crm-topbar{flex-wrap:wrap;row-gap:7px}.crm-brand{flex:0 1 auto}.crm-nav{flex:1 0 100%;order:4;margin-top:0}.crm-user{max-width:calc(100% - 108px)}.crm-user strong{max-width:105px}.crm-session-action{order:3;margin-left:auto!important}.crm-page{padding-top:20px}.crm-page .encabezado,.crm-page .panel{border-radius:13px!important}.crm-page .tarjetas{grid-template-columns:repeat(2,minmax(0,1fr))!important}.crm-page .tarjetas .tarjeta{padding:14px!important}.crm-page .tarjetas .tarjeta strong{font-size:21px}.crm-page .filtros>div,.crm-page .form-grid>div{min-width:0}.crm-page .filtros .acciones-filtro,.crm-page .acciones-filtro{display:grid;grid-template-columns:1fr 1fr;gap:8px}.crm-page .acciones-filtro button,.crm-page .acciones-filtro .boton{width:100%}.crm-page .tabla-scroll{margin-left:-2px;margin-right:-2px}.crm-page .tabla-scroll table{font-size:12px}.crm-page .tabla-scroll th,.crm-page .tabla-scroll td{padding:10px 9px!important}.crm-page .clientes-table{min-width:920px}.crm-page .clientes-table th:nth-child(2),.crm-page .clientes-table td:nth-child(2){position:sticky;left:0;z-index:2;background:#fff;box-shadow:4px 0 8px rgba(36,49,61,.05)}.crm-page .clientes-table th:nth-child(2){background:#f6f8f9}.crm-page .clientes-table tr:hover td:nth-child(2){background:#fafcfc}.crm-page .dos-columnas{grid-template-columns:1fr!important}.crm-page .fila-encabezado{align-items:flex-start;flex-direction:column}.crm-page .fila-encabezado .boton{width:100%}.crm-page .crm-section-nav{margin-bottom:14px}.crm-page .actividad-cabecera{align-items:flex-start;flex-direction:column}.crm-page .actividad-acciones,.crm-page .acciones-actividad{display:grid;grid-template-columns:1fr 1fr;gap:8px}.crm-page .actividad-acciones .boton,.crm-page .acciones-actividad button{width:100%}.crm-auth-page{align-items:start;padding:20px 14px}.crm-auth-card{width:min(100%,470px);margin:30px auto;padding:30px 22px}.crm-auth-logo{min-width:42px;height:42px;padding:0 10px}.crm-auth-brand-wordmark{font-size:20px}.crm-auth-card h1{margin-top:24px;font-size:27px}}
@media(max-width:480px){.crm-topbar{padding:8px 10px!important}.crm-brand{font-size:15px!important}.crm-brand-mark{display:none}.crm-user{max-width:calc(100% - 98px)}.crm-user strong{max-width:78px}.crm-session-action{font-size:0!important;min-width:36px;padding:8px!important}.crm-session-action span{font-size:18px}.crm-page{padding:16px 10px 28px}.crm-page .tarjetas,.crm-card-grid{grid-template-columns:1fr!important}.crm-page .encabezado,.crm-page .panel{padding:14px!important}.crm-page h1{font-size:24px!important}.crm-page .subtitulo{font-size:13px!important}.crm-page .filtros .acciones-filtro,.crm-page .acciones-filtro{grid-template-columns:1fr}.crm-page .actividad-acciones,.crm-page .acciones-actividad{grid-template-columns:1fr}.crm-auth-card{margin:12px auto;padding:26px 18px}.crm-auth-card h1{font-size:25px}.crm-auth-card>p{font-size:14px}.crm-auth-form{gap:14px}.crm-auth-form input{min-height:52px}.crm-auth-form button[type=submit]{min-height:52px}.crm-auth-logo{display:none}}
.crm-user-create label small,.crm-user-edit label small{color:var(--muted);font-size:11px;font-weight:500;line-height:1.35}
.crm-nav-toggle{display:none}
.crm-day-shortcut{display:block;color:inherit!important;text-decoration:none!important;cursor:pointer;border-top:3px solid var(--module,#3498DB)!important;transition:transform .16s ease,box-shadow .16s ease}.crm-day-shortcut:hover{transform:translateY(-2px);box-shadow:0 9px 20px rgba(36,49,61,.09)!important}.crm-day-shortcut:focus-visible{outline:3px solid var(--dia-soft);outline-offset:3px}
@media(max-width:768px){.crm-nav-toggle{display:inline-flex;align-items:center;gap:6px;min-height:36px;margin-left:auto;padding:8px 10px;border:1px solid #d7e3dd;border-radius:9px;background:#fff;color:#24513b;font:750 12px inherit}.crm-nav-toggle span{font-size:17px;line-height:1}.crm-topbar>.crm-nav{display:none!important;flex:1 0 100%;order:5;margin:0;padding:5px 0 1px!important;border-top:1px solid #e7edef}.crm-topbar>.crm-nav.crm-nav-open{display:flex!important}.crm-page .crm-day-shortcut{min-height:108px;display:flex;flex-direction:column;justify-content:center}.crm-page .clientes-table,.crm-page .clientes-table tbody,.crm-page .clientes-table tr,.crm-page .clientes-table td{display:block!important;width:100%!important;min-width:0!important}.crm-page .clientes-table{min-width:0!important}.crm-page .clientes-table thead{display:none}.crm-page .clientes-table tr{margin:0 0 10px;padding:12px;border:1px solid var(--line);border-radius:11px;background:#fff}.crm-page .clientes-table td{display:grid!important;grid-template-columns:42% 58%;gap:8px;padding:7px 0!important;border:0!important;text-align:left!important}.crm-page .clientes-table td:before{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}.crm-page .clientes-admin td:nth-child(1),.crm-page .clientes-admin td:nth-child(5),.crm-page .clientes-admin td:nth-child(9),.crm-page .clientes-admin td:nth-child(n+11){display:none!important}.crm-page .clientes-admin td:nth-child(2):before{content:"Cliente"}.crm-page .clientes-admin td:nth-child(3):before{content:"RUT"}.crm-page .clientes-admin td:nth-child(4):before{content:"Comuna"}.crm-page .clientes-admin td:nth-child(6):before{content:"Cartera"}.crm-page .clientes-admin td:nth-child(7):before{content:"Última compra"}.crm-page .clientes-admin td:nth-child(8):before{content:"Días"}.crm-page .clientes-admin td:nth-child(10):before{content:"Último vendedor"}.crm-page .clientes-vendedor td:nth-child(n+7){display:none!important}.crm-page .clientes-vendedor td:nth-child(1):before{content:"Cliente"}.crm-page .clientes-vendedor td:nth-child(2):before{content:"RUT"}.crm-page .clientes-vendedor td:nth-child(3):before{content:"Última compra"}.crm-page .clientes-vendedor td:nth-child(4):before{content:"Días"}.crm-page .clientes-vendedor td:nth-child(5):before{content:"Estado"}.crm-page .clientes-vendedor td:nth-child(6):before{content:"Último vendedor"}.crm-page .clientes-table td.nombre-cliente{font-weight:750}.crm-page .clientes-table th,.crm-page .clientes-table td{box-shadow:none!important}}
/* Official Alldental logo: keep the supplied image intact and proportionate. */
.crm-auth-logo-image{display:block;width:min(100%,180px);height:118px;object-fit:contain}.crm-auth-card .crm-auth-brand{min-height:118px}.crm-brand-logo{display:block;width:40px;height:40px;object-fit:contain;flex:0 0 40px}.crm-brand-context{font-size:12px;font-weight:800;letter-spacing:.09em;color:#8b9991;text-transform:uppercase}.crm-brand .crm-brand-mark{display:none!important}@media(max-width:768px){.crm-auth-logo-image{width:152px;height:100px}.crm-auth-card .crm-auth-brand{min-height:100px}.crm-brand-logo{width:31px;height:31px;flex-basis:31px}.crm-brand-context{font-size:11px}}@media(max-width:480px){.crm-auth-logo-image{width:136px;height:90px}.crm-auth-card .crm-auth-brand{min-height:90px}.crm-brand-logo{display:block}}
/* Mobile architecture: independent top bar + off-canvas drawer. Desktop keeps its fixed sidebar. */
.crm-mobile-topbar,.crm-drawer-header,.crm-drawer-close,.crm-drawer-backdrop{display:none}
@media(max-width:768px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  body.crm-drawer-active{overflow:hidden}
  .crm-mobile-topbar{position:sticky;top:0;z-index:70;display:flex;align-items:center;gap:12px;width:100%;height:58px;padding:0 16px;background:#fff;border-bottom:1px solid var(--line);box-shadow:0 2px 10px rgba(36,49,61,.06)}
  .crm-mobile-menu-toggle{display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid #d7e3dd;border-radius:10px;background:#fff;color:#1d6e48;font-size:22px;line-height:1;cursor:pointer}
  .crm-mobile-brand{color:#1f4935;text-decoration:none;font-size:17px;font-weight:800;letter-spacing:-.03em}.crm-mobile-brand span{color:#7d8c84;font-size:12px;letter-spacing:.08em;text-transform:uppercase}
  .crm-drawer-backdrop{position:fixed;inset:0;z-index:80;display:block;background:rgba(21,35,43,.42);opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease}.crm-drawer-backdrop.crm-drawer-backdrop-visible{opacity:1;visibility:visible}
  .crm-topbar{position:fixed!important;inset:0 auto 0 0!important;z-index:90!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;width:min(82vw,310px)!important;min-height:100dvh!important;padding:18px 14px!important;border:0!important;border-right:1px solid var(--line)!important;box-shadow:12px 0 30px rgba(20,39,49,.15)!important;transform:translateX(-105%);transition:transform .22s ease;overflow-y:auto}
  .crm-topbar.crm-drawer-open{transform:translateX(0)}
  .crm-drawer-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.crm-drawer-close{display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:9px;background:#f3f6f8;color:#50616a;font-size:26px;line-height:1;cursor:pointer}
  .crm-topbar .crm-brand{display:flex!important;min-width:0;padding:0!important}.crm-brand-logo{width:42px!important;height:42px!important;flex-basis:42px!important;max-width:42px!important;object-fit:contain}.crm-brand-context{font-size:12px!important}
  .crm-topbar .crm-context{display:block;margin:2px 8px 16px!important}
  .crm-topbar>.crm-nav,.crm-topbar>.crm-nav.crm-nav-open{display:flex!important;flex:0 0 auto!important;flex-direction:column!important;gap:4px!important;width:100%!important;order:initial!important;margin:0!important;padding:0!important;border:0!important;overflow:visible!important}
  .crm-topbar .crm-nav a{width:100%!important;min-height:46px!important;padding:10px 11px!important;font-size:14px!important;white-space:normal!important}
  .crm-topbar .crm-user{margin:auto 7px 4px!important;padding:13px 8px!important;border-top:1px solid #e7edef!important;max-width:none!important}.crm-topbar .crm-user strong{max-width:190px!important}.crm-topbar .crm-user small{display:block!important}
  .crm-topbar .crm-session-action{order:initial!important;margin:0 7px 8px!important;padding:10px!important;font-size:12px!important;min-width:0!important}.crm-topbar .crm-session-action span{font-size:16px!important}
  .crm-topbar .crm-nav-toggle{display:none!important}
  .crm-page{width:100%!important;max-width:100%!important;min-height:calc(100dvh - 58px)!important;margin-left:0!important;padding:20px 16px 32px!important;overflow-x:hidden}
  .crm-page .contenedor{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
  .crm-page.crm-module-inicio .crm-card-grid,.crm-page.crm-module-dia .tarjetas,.crm-page.crm-module-clientes .tarjetas{grid-template-columns:1fr!important}
  .crm-page .crm-dashboard-module{min-height:166px!important}.crm-page .crm-day-shortcut{min-height:116px!important}
  .crm-page .actividad{width:100%;padding:16px!important}.crm-page .actividad-cabecera,.crm-page .actividad-meta{width:100%}
  .crm-page .tabla-scroll{max-width:100%;overflow-x:auto}.crm-page .cartera-table{min-width:0!important}
  .crm-auth-page{min-height:100dvh!important;padding:16px!important;place-items:center!important}.crm-auth-card{width:min(100%,450px)!important;margin:0 auto!important;padding:24px 20px!important}.crm-auth-card .crm-auth-brand{min-height:0!important;margin:0 0 8px!important}.crm-auth-logo-image{display:block;width:min(100%,190px)!important;max-width:190px!important;height:auto!important;max-height:none!important;object-fit:contain!important}.crm-auth-card h1{margin:14px 0 6px!important}.crm-auth-card>p{margin-bottom:18px!important}
}
@media(max-width:480px){
  .crm-mobile-topbar{height:56px;padding:0 14px}.crm-page{min-height:calc(100dvh - 56px)!important;padding:18px 16px 28px!important}.crm-topbar{width:min(86vw,300px)!important}.crm-page .encabezado,.crm-page .panel{padding:15px!important}.crm-auth-page{padding:12px!important}.crm-auth-card{padding:20px 18px!important}.crm-auth-logo-image{width:min(100%,180px)!important;max-width:180px!important}.crm-auth-card h1{font-size:24px!important}.crm-auth-form{gap:12px!important}.crm-auth-form input,.crm-auth-form button[type=submit]{min-height:50px!important}
}
@media(min-width:769px){.crm-auth-card .crm-auth-brand{min-height:0!important;margin:0 0 10px!important}.crm-auth-logo-image{width:230px!important;max-width:230px!important;height:auto!important;object-fit:contain!important}}
/* Mobile drawer footer: navigation scrolls independently; identity and session action remain reachable. */
@media(max-width:768px){
  .crm-topbar{height:100vh!important;height:100dvh!important;min-height:0!important;max-height:100dvh!important;overflow:hidden!important;padding-bottom:max(16px,env(safe-area-inset-bottom))!important}
  .crm-topbar .crm-drawer-header,.crm-topbar .crm-context,.crm-topbar .crm-user,.crm-topbar .crm-session-action{flex:0 0 auto!important}
  .crm-topbar>.crm-nav,.crm-topbar>.crm-nav.crm-nav-open{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain;padding:0 3px 8px 0!important}
  .crm-topbar .crm-user{margin:10px 7px 4px!important}
  .crm-topbar .crm-session-action{margin:0 7px 0!important}
}
/* Final drawer geometry: it begins below the mobile topbar and ends at the viewport edge. */
@media(max-width:768px){
  :root{--crm-mobile-header-height:58px}
  .crm-mobile-topbar{z-index:100!important}
  .crm-topbar{top:var(--crm-mobile-header-height)!important;right:auto!important;bottom:0!important;left:0!important;inset:var(--crm-mobile-header-height) auto 0 0!important;height:auto!important;min-height:0!important;max-height:none!important}
}
@media(max-width:480px){:root{--crm-mobile-header-height:56px}}
/* Clientes administrativo: ocupa todo el espacio disponible a la derecha del sidebar. */
@media(min-width:1200px){.crm-page.crm-module-clientes{padding:20px!important}.crm-page.crm-module-clientes .contenedor.contenedor-clientes-admin{width:100%!important;max-width:none!important;margin:0!important}.crm-page.crm-module-clientes .panel{padding:16px!important}}
/* Mobile topbar contains navigation only; session action remains in the drawer footer. */
@media(max-width:768px){
  .crm-mobile-topbar{display:flex!important;gap:12px}
  .crm-mobile-menu-toggle{width:44px!important;height:44px!important}
  .crm-mobile-brand{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .crm-mobile-session-action{display:none!important}
  .crm-topbar .crm-session-action{display:flex!important;align-items:center!important;justify-content:center!important;min-height:44px!important;margin:0 7px 0!important;padding:10px!important;font-size:13px!important}
}
