:root {
    --erp-rojo: #e50914;
    --erp-rojo-oscuro: #850000;
    --erp-dorado: #ffc400;
    --erp-negro: #151515;
    --erp-gris: #242424;
}
.icono { width: 20px; height: 20px; flex: 0 0 20px; }
.admin-erp { background: #f4f5f7; color: #242424; }
.admin-erp h1, .admin-erp h2, .admin-erp h3 { color: #151515; }
.admin-erp a { color: #a20d14; }
.erp-shell { --ancho-menu: 250px; min-height: 100vh; }
.erp-lateral {
    position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--ancho-menu);
    display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden;
    background: linear-gradient(165deg, #242424, #151515 62%); color: #fff;
    transition: width .22s ease, transform .22s ease; box-shadow: 4px 0 22px #15151512;
}
.erp-marca { display: flex; align-items: center; gap: .7rem; min-height: 92px; padding: 1rem; text-decoration: none; border-bottom: 1px solid #ffffff12; }
.erp-marca img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid #ffc400; flex: 0 0 52px; }
.erp-marca strong { display: block; color: #fff; font-size: .73rem; white-space: nowrap; letter-spacing: .03em; }
.erp-marca small { color: #ffc400; font-size: .74rem; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.erp-marca i { font-style: normal; color: #e50914; }
.erp-etiqueta { padding: 1.25rem 1.2rem .45rem; color: #919191; font-size: .62rem; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.erp-nav { display: grid; gap: .2rem; padding: .2rem .65rem; }
.admin-erp .erp-nav a, .erp-cerrar button {
    min-height: 40px; display: flex; align-items: center; gap: .8rem; padding: .65rem .75rem;
    border-radius: .55rem; color: #d3d3d3; font-size: .82rem; font-weight: 600; text-decoration: none;
    white-space: nowrap; transition: background .18s, color .18s;
}
.erp-nav a .texto-menu { flex: 1; }
.erp-nav a small { float: right; color: #9c9c9c; font-size: .6rem; }
.admin-erp .erp-nav a:hover, .admin-erp .erp-nav a.actual { background: #e50914; color: #fff; }
.erp-nav a:hover small { color: #fff; }
.erp-cerrar { margin: auto .65rem .8rem; padding-top: .8rem; border-top: 1px solid #ffffff1a; }
.erp-cerrar button { margin: 0; width: 100%; background: transparent; text-align: left; }
.erp-cerrar button:hover { background: #ffffff12; color: white; }
.erp-principal { margin-left: var(--ancho-menu); min-width: 0; transition: margin-left .22s ease; }
.erp-superior {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem;
    min-height: 74px; padding: .7rem 2rem; background: #fff; border-bottom: 1px solid #e8e8ec;
}
.erp-superior button { margin: 0; }
.erp-menu-boton, .erp-notificacion, .erp-buscador button {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 42px; min-height: 42px; padding: 0; border: 0; border-radius: .65rem; background: #f5f5f7; color: #343434;
}
.erp-menu-boton:hover, .erp-buscador button:hover { background: #ececef; color: #e50914; }
.erp-buscador { display: flex; align-items: center; gap: .65rem; width: min(390px, 40%); padding: 0 .4rem 0 .9rem; border: 1px solid #ebebee; border-radius: .7rem; background: #f7f7f9; color: #929292; }
.erp-buscador input:not([type="checkbox"]) { min-height: 42px; padding: .3rem 0; border: 0; outline: 0; background: transparent; font-size: .82rem; }
.erp-buscador:focus-within { border-color: #e50914; }
.erp-buscador button { width: 34px; min-height: 34px; background: transparent; }
.erp-fecha { display: flex; align-items: center; gap: .45rem; margin-left: auto; color: #777; font-size: .8rem; white-space: nowrap; }
.erp-fecha .icono { width: 16px; height: 16px; flex-basis: 16px; }
.admin-erp .erp-notificacion { position: relative; color: #393939; text-decoration: none; }
.erp-notificacion span { position: absolute; top: -4px; right: -4px; min-width: 18px; padding: 2px 4px; border-radius: 20px; background: #e50914; color: white; text-align: center; font-size: .62rem; font-weight: 800; }
.admin-erp .erp-perfil { display: flex; align-items: center; gap: .6rem; color: #222; text-decoration: none; }
.erp-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: #ffe4e4; color: #ba1017; font-weight: 800; }
.erp-perfil strong, .erp-perfil small { display: block; font-size: .76rem; white-space: nowrap; }
.erp-perfil small { margin: .15rem 0 0; color: #888; font-size: .67rem; }
.erp-fondo-menu { display: none; }
.admin-erp .erp-contenido { max-width: 1560px; margin: 0 auto; padding: 2rem; }
.admin-erp .tarjeta { border: 1px solid #ebebee; border-radius: .85rem; box-shadow: 0 5px 25px #15151508; }
.admin-erp .boton-enlace { gap: .5rem; background: #e50914; color: white; }
.admin-erp .boton-enlace:hover { background: #b40a12; }
.admin-erp .boton-secundario { background: #fff4d0; color: #6b4700; }
.admin-erp .boton-secundario:hover { background: #ffe6a0; }
.erp-sobrelinea { margin: 0 0 .45rem; color: #e50914; font-size: .65rem; font-weight: 800; letter-spacing: .11em; }
.dashboard-bienvenida { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.dashboard-bienvenida h1 { margin: 0; font-size: clamp(1.35rem, 2.4vw, 2rem); letter-spacing: -.04em; }
.dashboard-bienvenida h1 span { color: #e50914; }
.dashboard-bienvenida p:not(.erp-sobrelinea) { margin: .45rem 0 0; color: #7b7b82; font-size: .9rem; }
.punto-activo { display: inline-block; width: 7px; height: 7px; margin-right: .25rem; border-radius: 50%; background: #e50914; }
.admin-erp .dashboard-fecha { display: flex; align-items: center; gap: .5rem; padding: .8rem; border: 1px solid #e8e8ec; border-radius: .65rem; background: white; color: #343434; text-decoration: none; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.dashboard-fecha span { color: #999; font-weight: 400; }
.metricas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.metrica { display: flex; align-items: center; gap: .85rem; min-width: 0; padding: 1.1rem; border: 1px solid #ececf0; border-radius: .8rem; background: white; box-shadow: 0 4px 18px #15151506; }
.metrica-icono, .actividad-icono, .modulo-icono { display: grid; place-items: center; width: 47px; height: 47px; flex: 0 0 47px; border-radius: .7rem; }
.metrica-icono.rojo { background: #ffe8e9; color: #e50914; }
.metrica-icono.dorado { background: #fff5d5; color: #c08900; }
.metrica-icono.claro { background: #e8f6ec; color: #26884c; }
.metrica-icono.gris { background: #f1f1f3; color: #85858b; }
.metrica p { margin: 0; color: #777780; font-size: .75rem; }
.metrica strong { display: block; margin-top: .3rem; overflow-wrap: anywhere; color: #18181b; font-size: 1.26rem; letter-spacing: -.04em; }
.metrica small { margin: .2rem 0 0; color: #98989f; font-size: .66rem; }
.graficas { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1rem; margin-top: 1rem; }
.admin-erp .grafica { min-width: 0; padding: 1.25rem; }
.grafica-cabecera, .seccion-cabecera { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.grafica-cabecera > .icono, .seccion-cabecera > .icono { color: #e50914; }
.grafica h2, .actividad h2, .gestion-admin h2 { margin: 0; font-size: 1rem; letter-spacing: -.02em; }
.grafica-cabecera p:not(.erp-sobrelinea), .seccion-cabecera p:not(.erp-sobrelinea) { margin: .3rem 0 0; color: #96969c; font-size: .75rem; }
.grafica-insignia { padding: .45rem .6rem; border-radius: .5rem; background: #fff4db; color: #8c6000; font-size: .68rem; white-space: nowrap; }
.grafica-barras { display: flex; align-items: stretch; gap: .5rem; height: 180px; margin-top: 1rem; padding-top: .3rem; background: repeating-linear-gradient(to top, transparent 0, transparent 43px, #f1f1f3 44px, transparent 45px); }
.grafica-columna { display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: center; justify-content: end; gap: .5rem; }
.grafica-columna .barra-dato { width: min(32px, 80%); min-height: 4px; height: max(4px, var(--altura)); margin: 0; padding: 0; border: 0; border-radius: .35rem .35rem 0 0; background: linear-gradient(#ff5155, #e50914); transition: opacity .2s, transform .2s; }
.grafica-columna .barra-dato:hover, .grafica-columna .barra-dato.seleccionada { opacity: .8; transform: scaleX(1.12); }
.grafica-columna span { color: #8a8a91; font-size: .63rem; white-space: nowrap; }
.grafica-detalle { min-height: 1.2rem; margin: .65rem 0 0; color: #777780; font-size: .7rem; }
.barras-meses { height: 150px; gap: .18rem; }
.barras-meses .grafica-columna span { font-size: .5rem; }
.ranking-productos { margin-top: 1rem; }
.ranking-fila { margin: .9rem 0; color: #45454b; font-size: .79rem; }
.ranking-fila div:first-child { display: flex; align-items: center; gap: .4rem; }
.ranking-fila div:first-child span { color: #e50914; font-weight: 800; }
.ranking-fila strong { margin-left: auto; color: #151515; }
.ranking-pista { height: 6px; margin-top: .45rem; overflow: hidden; border-radius: 6px; background: #f0f0f2; }
.ranking-pista span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e50914, #ff7772); }
.balance-fila { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; font-size: .85rem; }
.balance-fila i { display: inline-block; width: 9px; height: 9px; margin-right: .5rem; border-radius: 50%; background: #e50914; }
.balance-fila i.indicador-gasto { background: #ffc400; }
.erp-vacio { color: #8a8a91; font-size: .8rem; }
.admin-erp .actividad { margin-top: 1rem; padding: 1.25rem; }
.actividad .grafica-cabecera a { display: flex; align-items: center; gap: .2rem; font-size: .75rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.actividad .grafica-cabecera a .icono { width: 15px; height: 15px; flex-basis: 15px; }
.actividad-fila { display: flex; align-items: center; gap: .8rem; padding: .8rem 0; border-bottom: 1px solid #f1f1f3; font-size: .8rem; }
.actividad-fila div { flex: 1; }
.actividad-fila small { color: #999; }
.actividad-icono { width: 38px; height: 38px; flex-basis: 38px; background: #fff0ef; color: #e50914; }
.actividad-nota { margin: 1rem 0 0; color: #999; font-size: .68rem; }
.gestion-admin .accesos-admin { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.admin-erp .gestion-admin .boton-enlace { background: #f6f6f8; color: #262626; border: 1px solid #ededf0; }
.admin-erp .gestion-admin .boton-enlace:hover { background: #fff0f0; color: #ba1017; }
.busqueda-resultado { margin-top: 1rem; padding: 1rem; border-radius: .75rem; background: #fff5da; }
.busqueda-resultado p { margin: .3rem 0 0; font-size: .85rem; }
.admin-erp .erp-contenido > .tarjeta:only-child { max-width: 740px; }
.admin-erp .modulo-pendiente { padding: 2.5rem; }
.modulo-icono { margin-bottom: 1.2rem; background: #fff0ef; color: #e50914; }
.modulo-pendiente p:not(.erp-sobrelinea) { color: #777; }
.modulo-pendiente .boton-enlace { margin-top: 1rem; }
@media (min-width: 861px) {
    .erp-shell.plegado { --ancho-menu: 76px; }
    .erp-shell.plegado .texto-menu { display: none; }
    .erp-shell.plegado .erp-marca { justify-content: center; padding-inline: .5rem; }
    .erp-shell.plegado .erp-nav a, .erp-shell.plegado .erp-cerrar button { justify-content: center; }
}
@media (max-width: 1100px) {
    .erp-perfil-texto, .erp-fecha { display: none; }
    .erp-buscador { margin-right: auto; width: min(390px, 55%); }
}
@media (max-width: 860px) {
    .erp-shell { --ancho-menu: 0px; }
    .erp-lateral { width: 250px; transform: translateX(-100%); }
    .erp-shell.menu-abierto .erp-lateral { transform: translateX(0); }
    .erp-shell.menu-abierto .erp-fondo-menu { display: block; position: fixed; inset: 0; z-index: 25; width: 100%; height: 100%; margin: 0; padding: 0; border-radius: 0; background: #0009; }
    .erp-superior { padding: .65rem 1rem; gap: .65rem; }
    .admin-erp .erp-contenido { padding: 1.2rem; }
    .graficas { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .metricas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
    .metrica { display: block; padding: .9rem; }
    .metrica-icono { width: 40px; height: 40px; margin-bottom: .7rem; }
    .metrica strong { font-size: 1.05rem; }
    .dashboard-bienvenida { display: block; }
    .admin-erp .dashboard-fecha { display: inline-flex; margin-top: .9rem; }
    .erp-buscador { width: auto; flex: 1; min-width: 0; }
    .erp-perfil { display: none !important; }
    .erp-notificacion { width: 36px; }
    .admin-erp .erp-contenido { padding: 1rem; }
}
@media (max-width: 350px) { .metricas { grid-template-columns: 1fr; } }

.acceso-erp {
    min-height: 100vh; color: #fff;
    background: radial-gradient(ellipse at 38% 30%, #c31119 0, #850000 35%, #330606 75%, #170a0a 100%);
}
.acceso-erp::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: linear-gradient(155deg, transparent 0 16%, #ffc400 16.2% 17%, #bd1017 17.2% 20%, transparent 20.2%); opacity: .8; }
.acceso-erp .acceso-contenido { position: relative; max-width: 1250px; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 2rem; }
.acceso-diseno { display: grid; grid-template-columns: 1fr minmax(320px, 430px); align-items: center; gap: clamp(2rem, 6vw, 6rem); width: 100%; }
.acceso-marca { text-align: center; }
.acceso-distintivo { color: #ffdd80; font-size: .7rem; font-weight: 800; letter-spacing: .18em; }
.acceso-distintivo span, .acceso-pie span { color: #ffc400; }
.acceso-logo { display: block; width: min(300px, 70%); height: auto; margin: 1.1rem auto; border-radius: 25%; box-shadow: 0 16px 35px #22000080; }
.acceso-marca h1 { margin: .9rem 0 .4rem; color: #fff; font-size: clamp(1.4rem, 3vw, 2.1rem); letter-spacing: -.035em; }
.acceso-marca > p { margin: 0; color: #ffe4dc; }
.acceso-beneficios { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem 1.4rem; margin-top: 2rem; }
.acceso-beneficios span { display: flex; align-items: center; gap: .35rem; color: #ffdfbc; font-size: .75rem; }
.acceso-beneficios .icono { width: 17px; height: 17px; flex-basis: 17px; color: #ffc400; }
.acceso-panel { padding: 2.5rem; border: 1px solid #d34434; border-top: 3px solid #ffc400; border-radius: 1rem; background: linear-gradient(150deg, #251111ed, #130d0dec); box-shadow: 0 20px 60px #2300008c; }
.acceso-panel-etiqueta { color: #ffc400; font-size: .67rem; font-weight: 800; letter-spacing: .14em; }
.acceso-panel h2 { margin: .55rem 0 .35rem; color: #fff; font-size: 2rem; letter-spacing: -.04em; }
.acceso-panel h2 em { color: #ffc400; font-style: normal; }
.acceso-panel > p { margin: 0; color: #d6bcbc; font-size: .85rem; }
.acceso-panel form { margin-top: 1.7rem; }
.acceso-panel label { margin: 1rem 0 .45rem; color: #f5e2e2; font-size: .77rem; }
.acceso-campo { display: flex; align-items: center; gap: .7rem; padding: 0 .8rem; border: 1px solid #68413f; border-radius: .6rem; background: #ffffff0b; color: #d8c6c6; }
.acceso-campo:focus-within { border-color: #ffc400; }
.acceso-campo input:not([type="checkbox"]) { min-width: 0; padding: .75rem 0; border: 0; outline: 0; background: transparent; color: #fff; }
.acceso-campo input::placeholder { color: #9d8585; }
.acceso-campo input:autofill, .acceso-campo input:-webkit-autofill,
.acceso-campo input:-webkit-autofill:hover, .acceso-campo input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #211313 inset;
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
}
.acceso-campo .mostrar-password { display: grid; place-items: center; width: 36px; min-height: 42px; margin: 0; padding: 0; background: transparent; color: #c9b0b0; }
.acceso-campo .mostrar-password:hover { color: #ffc400; }
.acceso-ingresar { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; margin-top: 1.5rem; border-radius: .6rem; background: #e50914; box-shadow: 0 6px 20px #e5091435; }
.acceso-ingresar:hover { background: #bd0710; }
.acceso-panel .acceso-ayuda { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid #ffffff18; color: #b9a2a2; font-size: .73rem; text-align: center; }
.acceso-pie { margin-top: 2rem; color: #e8b8b2; font-size: .67rem; letter-spacing: .06em; text-align: center; }
.acceso-contenido > .mensaje { width: min(430px, 100%); margin: 0 0 1rem auto; }
@media (max-width: 760px) {
    .acceso-erp .acceso-contenido { padding: 1.2rem; }
    .acceso-diseno { grid-template-columns: 1fr; gap: 1.5rem; max-width: 430px; margin: auto; }
    .acceso-logo { width: 155px; margin: .6rem auto; }
    .acceso-marca h1 { font-size: 1.35rem; }
    .acceso-beneficios { display: none; }
    .acceso-panel { padding: 1.5rem; }
    .acceso-contenido > .mensaje { margin: 0 auto 1rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
