/* ================================================= */
/* MODERNIZACIÓN INTEGRAL - SISTEMA MAX TEC 2026     */
/* ================================================= */

:root {
    /* 1. COLORES DE IDENTIDAD (Basados en el logo) */
    --primary: #32b1be;         /* Turquesa principal para destacar */
    --primary-hover: #268d98;   /* Turquesa un poco más oscuro al pasar el ratón */
    --secondary: #64748b;       /* Gris pizarra (tomado del triángulo gris del logo) */
    --secondary-light: #f8fafc; /* Gris/azulado ultra claro para no cansar la vista */
    --accent: #475569;          /* Gris oscuro para contrastes y textos fuertes */
    
    /* 2. COLORES DE ACCIÓN (Corregidos para el carrito) */
    --success: #10b981;         /* Verde esmeralda suave para "Vender/Guardar" */
    --success-hover: #059669;   /* Verde oscuro para el hover */
    --danger: #ef4444;          /* Rojo suave para "Cancelar/Eliminar" */
    --danger-hover: #dc2626;    
    
    /* 3. COLORES ESTRUCTURALES (Confort Visual) */
    --bg-main: #f1f5f9;         /* Fondo de la app (un gris ligerísimo, quita el brillo del blanco puro) */
    --bg-surface: #ffffff;      /* Fondo de los formularios y tablas (Blanco limpio) */
    --text-main: #334155;       /* Texto oscuro (más suave que el negro absoluto) */
    --text-muted: #94a3b8;      /* Texto secundario (etiquetas, placeholders) */
    --border-color: #cbd5e1;    /* Bordes suaves que no compiten por la atención */
    
    /* 4. SOMBRAS Y BORDES (Mantenemos tu diseño redondeado) */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

body {
    background-color: var(--bg-main) !important;
    color: var(--text-main);
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

.super-contenedor {
    background-color: var(--bg-main) !important; 
}

.panel-medio-principal {
    position: relative !important;
    background-color: var(--bg-main) !important;
}

.panel-medio {
    margin-top: 15px !important;
    background-color: var(--bg-surface) !important;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.panel-medio .box-header {
    padding: 20px 30px !important;
    font-size: 1.5em !important;
    border-bottom: 1px solid var(--border-color);
    background-color: transparent !important;
}

.panel-medio .box-header .box-title {
    font-size: 1.1em !important;
    font-weight: 600;
    color: var(--text-main);
}

.main-sidebar {
    background-color: var(--bg-surface) !important;
    box-shadow: 4px 0 10px rgba(0,0,0,0.03) !important;
    border-right: 1px solid var(--border-color);
}

.main-sidebar .sidebar {
    background-color: var(--bg-surface);
    color: var(--text-main) !important;
    padding: 0 !important;
}

.cabecera-m {
    background-image: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: var(--shadow-md);
    border: none !important;
}

.cabecera-m .logo {
    background-color: rgba(255, 255, 255, 0.1) !important; /* Cristal sutil */
    backdrop-filter: blur(5px);
    border-right: 1px solid rgba(255,255,255,0.1);
    color: #fff !important;
    font-weight: 700;
}

/* SIDEBAR-MENU */
.main-sidebar .sidebar p,
.main-sidebar .sidebar span {
    color: var(--text-main) !important;
}

.main-sidebar .sidebar i {
    color: var(--secondary) !important; 
    transition: color 0.3s ease;
}

.user-panel2 {
    display: flex !important;
    width: 90% !important;
    flex-flow: column !important;
    justify-content: center !important;
    align-items: center !important;
    align-content: center !important;
    /* Aumentamos el margen a 55px para que salga de debajo de la barra azul */
    margin: 55px auto 15px auto !important; 
    padding: 15px 10px;
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
    overflow: hidden !important; /* Evita que nada se desborde fuera de esta caja */
}

.user-panel2 img,
.img-user {
    position: relative !important;
    width: 80px !important;
    max-width: 80px !important;
    min-width: 80px !important; /* Candado mínimo */
    height: 80px !important;
    max-height: 80px !important;
    min-height: 80px !important; /* Candado máximo */
    object-fit: cover !important;
    border: 3px solid var(--bg-surface);
    box-shadow: var(--shadow-md);
    border-radius: 50% !important;
    transition: all 0.3s ease;
    display: block !important;
    margin: 0 auto !important;
}
/* ================================================= */
/* ESTILOS DEL PANEL DE USUARIO (BARRA COLAPSADA)    */
/* ================================================= */

/* 1. MODO ESCRITORIO (Solo aplica a pantallas grandes) */
@media (min-width: 768px) {
    /* Corrige el recorte de iconos centrando el contenido */
    body.sidebar-collapse .sidebar-menu > li > a {
        text-align: center;
        padding: 15px 0;
    }
    body.sidebar-collapse .sidebar-menu > li > a > .fa,
    body.sidebar-collapse .sidebar-menu > li > a > .fas {
        width: 100%;
        margin-right: 0 !important;
        font-size: 1.2em;
    }
    /* Estilos del texto flotante (Pop-out) */
    body.sidebar-collapse .sidebar-menu > li > a > span {
        position: absolute !important;
        left: 100% !important;
        top: 0 !important;
        background-color: var(--bg-surface) !important;
        padding: 12px 20px !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-md) !important;
        box-shadow: var(--shadow-lg) !important;
        white-space: nowrap !important;
        z-index: 9999 !important;
        margin-left: 0 !important;
        display: none !important; /* Oculto por defecto */
    }
    body.sidebar-collapse .sidebar-menu > li:hover > a > span {
        display: block !important; /* Aparece al pasar el ratón */
    }
    body.sidebar-collapse .sidebar-menu > li > a > span::before {
        content: ''; position: absolute; top: -10px; left: -20px;
        width: 20px; height: calc(100% + 20px); background-color: transparent;
    }
    /* Ocultar elementos del usuario en modo colapsado */
    body.sidebar-collapse .user-panel2 p,
    body.sidebar-collapse .user-panel2 span,
    body.sidebar-collapse .user-panel2 .boton-user {
        display: none !important;
    }
body.sidebar-collapse .user-panel2 {
    background-color: transparent; padding: 10px 0; width: 100% !important; margin-left: 0 !important;
}

/* Candados estrictos para cuando la barra se hace pequeña (40px) */
body.sidebar-collapse .user-panel2 img,
body.sidebar-collapse .user-panel2 .img-user {
    width: 40px !important; 
    max-width: 40px !important;
    min-width: 40px !important;
    height: 40px !important; 
    max-height: 40px !important;
    min-height: 40px !important;
    border: 2px solid var(--secondary-light); 
    box-shadow: var(--shadow-sm);
}
    /* Submenús en modo colapsado */
    body.sidebar-collapse .sidebar-menu > li { position: relative; }
    .sidebar-collapse .treeview a { width: 100% !important; }
    .sidebar-collapse .treeview-menu {
        position: absolute !important; top: 0 !important; left: 100% !important;
        width: 235px !important; border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-color); background-color: var(--bg-surface) !important;
        z-index: 9999; margin-left: 0; display: none !important;
    }
    .sidebar-collapse .treeview-menu::before {
        content: ''; position: absolute; top: 0; left: -15px; width: 15px; height: 100%; background-color: transparent;
    }
    body.sidebar-collapse .sidebar-menu li:hover > .treeview-menu {
        display: block !important;
    }
}
/* --- FIN DE LA CORRECCIÓN DEL SUBMENÚ --- */


/* ================================================= */
/* 2. MODO MÓVIL (Celulares y Tablets pequeñas)      */
/* ================================================= */
@media (max-width: 767px) {
    /* Restauramos todos los textos */
    .sidebar-menu > li > a > span,
    .user-panel2 p,
    .user-panel2 span,
    .user-panel2 .boton-user {
        display: block !important;
    }

    /* En móvil JAMÁS debe encogerse a 40px, forzamos los 80px siempre */
    body.sidebar-collapse .user-panel2 img,
    body.sidebar-collapse .user-panel2 .img-user {
        width: 80px !important;
        max-width: 80px !important;
        min-width: 80px !important;
        height: 80px !important;
        max-height: 80px !important;
        min-height: 80px !important;
    }

    .sidebar-menu > li > a {
        text-align: left !important;
        padding: 15px 20px !important;
        font-size: 1.1em;
    }

    .sidebar-menu .treeview-menu > li > a {
        padding: 12px 15px 12px 40px !important;
        font-size: 1.05em;
    }
}
.sidebar-menu li > a {
    color: var(--text-muted) !important; 
    background-color: transparent !important;
    border-radius: var(--radius-sm);
    margin: 2px 0;
    transition: all 0.2s ease;
}

.sidebar-menu li > a:hover {
    background-color: var(--bg-main) !important; 
    color: var(--primary) !important;
}

.sidebar-menu li > a:hover i {
    color: var(--primary) !important;
}

.sidebar-menu > li:hover {
    background-color: transparent !important; 
}

.sidebar-menu .treeview > ul {
    background-color: var(--bg-main) !important;
    border-radius: var(--radius-sm);
    margin: 5px;
}

.sidebar-menu .treeview .treeview-menu > li {
    padding: 2px 5px !important;
    background-color: transparent !important;
}

.sidebar-menu .treeview .treeview-menu li > a {
    color: var(--text-muted) !important;
    background-color: transparent !important;
    padding-left: 20px;
}

.sidebar-menu .treeview .treeview-menu li > a:hover {
    color: var(--primary) !important;
    background-color: rgba(232, 31, 118, 0.05) !important; /* Fondo fucsia ultra claro */
}

.sidebar-menu .treeview .treeview-menu > li:hover {
    background-color: transparent !important;
}

.sidebar-menu .menu-ini-p a {
    padding: 12px;
    background-color: transparent !important;
}

.rounded {
    box-shadow: var(--shadow-sm) !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-color) !important;
}

.dashboard-header {
    background-color: var(--bg-surface) !important;
    border-radius: var(--radius-md) !important;
    margin-top: 15px !important;
    margin: 0 auto !important;
    padding: 10px !important;
    box-shadow: var(--shadow-sm);
}

.dashboard-header button {
    background: linear-gradient(135deg, var(--accent) 0%, #333333 100%); /* Ajustado a gris oscuro */
    outline: 0;
    border-style: none;
    border-radius: var(--radius-sm);
    margin-left: 15px !important;
    font-size: 0.9em !important;
    font-weight: 600;
    color: rgb(255, 255, 255);
    padding: 10px 16px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(74, 74, 74, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-header button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 74, 74, 0.4);
}

.dashboard-header button i {
    margin-right: 8px !important;
}

.boton-user {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff !important;
    outline: 0;
    border: none;
    width: 100% !important;
    border-radius: 20px !important;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(232, 31, 118, 0.3);
    transition: transform 0.2s;
}

.boton-user:hover {
    transform: translateY(-2px);
}

body.sidebar-collapse .boton-user {
    display: none !important;
}

.icon-user {
    color: var(--primary) !important;
    background-color: #fff !important;
    padding: 6px !important;
    border-radius: 50% !important;
    margin-right: 6px !important;
    box-shadow: var(--shadow-sm);
}

/* BOTON DE AGREGAR, EDITAR, ETC */
.btn-radius {
    position: relative !important;
    outline: 0 !important;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.8em !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-weight: 600 !important;
    color: white !important;
    padding: 10px 16px !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.btn-radius .glyphicon-plus-sign, .btn-radius .fa-plus-circle, .btn-radius .fa-plus-square {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin-right: 8px;
    color: white;
}

.btn-radius:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%) !important;
}

/* Mantenemos los estados por seguridad, pero con estilos modernos */
.btn-radius:link, .btn-radius:visited, .btn-radius:active {
    color: white !important;
}

/* DATA TABLE */
.dataTables_length label, .dataTables_filter label {
    font-size: 0.95em;
    font-weight: 500 !important;
    color: var(--text-muted);
}

.box-body .table-user {
    display: flex !important;
    flex-flow: row wrap !important;
}

.dataTables_length {
    position: absolute;
}

.dataTables_filter {
    position: relative !important;
    float: right;
}

.table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.table th {
    text-transform: uppercase;
    color: var(--text-muted) !important; 
    font-weight: 600 !important;
    font-size: 0.8em !important;
    letter-spacing: 0.5px !important;
    text-align: center !important;
    background-color: var(--bg-main) !important;
    border-bottom: 2px solid var(--border-color) !important;
    padding: 15px 10px !important;
}

.table td {
    border-style: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 12px 10px !important;
    vertical-align: middle !important;
}

.table tbody tr:hover {
    background-color: var(--bg-main) !important;
}

.input-group-search .btn.dropdown-toggle {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-main) !important;
    background-color: var(--bg-surface) !important;
    box-shadow: var(--shadow-sm);
}

.table .selectpicker, .input-group-search .selectpicker {
    width: 60px;
    border-radius: var(--radius-sm) !important;
    font-size: 1em;
    font-weight: 500 !important;
    border: 1px solid var(--border-color);
}

.table input[type=search] {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
    font-size: 0.95em !important;
    font-weight: 400 !important;
    outline: 0;
    padding: 8px 15px !important;
    border: 1px solid var(--border-color);
    margin-left: 5px !important;
    height: 38px;
    border-right: 0;
    transition: border-color 0.3s;
}

.table input[type=search]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.table .icon-search {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
    background: var(--primary) !important;
    height: 38px;
    color: rgb(255, 255, 255);
    border: 1px solid var(--primary) !important;
    cursor: pointer;
    transition: background 0.3s;
}

.table .icon-search:hover {
    background: var(--primary-hover) !important;
}

/* PAGINACIÓN */
.pagination > li > a, .pagination > li > span {
    border-radius: var(--radius-sm) !important;
    margin: 0 3px;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.pagination > .active > a {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

/* BOTONES WEB (Rediseñados tipo SaaS) */
.btn-un, .btn-dos, .btn-tres, .btn-cuatro {
    margin: 10px;
    padding: 12px 30px;
    text-align: center;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    color: white !important;
    border-radius: var(--radius-sm);
    display: block;
    border: none;
}

.btn-un {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%); /* Success Emerald */
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}
.btn-dos {
    background: linear-gradient(135deg, var(--secondary) 0%, #7c3aed 100%); /* Violet */
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}
.btn-tres {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); /* Blue Info */
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}
.btn-cuatro {
    background: linear-gradient(135deg, var(--accent) 0%, #e11d48 100%); /* Rose Danger */
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.3);
}

.btn-un:hover, .btn-dos:hover, .btn-tres:hover, .btn-cuatro:hover {
    transform: translateY(-2px);
    text-decoration: none;
    filter: brightness(1.1);
}

/* FONDO DE PANTALLA LOGIN */
#fondP {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    background: url('../img/wallpaper2.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden !important;
    z-index: -1;
}

#fondP .fnd {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    /*background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(79, 70, 229, 0.7)) !important;  Cristal oscuro elegante */
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.7), rgba(50, 177, 190, 0.4)) !important;
    backdrop-filter: blur(2px); /* <-- Bajamos el desenfoque de 8px a 2px */
    /*backdrop-filter: blur(8px);*/
    z-index: -1;
    overflow-y: auto !important;
}

.log-cont {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

.log-cont .login-box,
.log-cont .register-box {
    position: relative !important;
    margin: 0 auto !important;
    padding: 0 !important;
    width: 100%;
    max-width: 400px; /* Tamaño controlado */
}

.logo-empresa {
    position: relative;
    width: 100%;
    height: auto !important;
    text-align: center;
    display: flex !important;
    flex-flow: column !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 25px;
}

.logo-empresa img {
    width: 170px !important;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.login-box-body p {
    font-weight: 500 !important;
    font-size: 1.1em;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 20px;
}

.login-box-body {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg) !important;
    padding: 40px 30px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255,255,255,0.2);
}

.login-box-body form input {
    border-radius: var(--radius-sm) !important;
    outline: 0;
    border: 1px solid var(--border-color);
    padding: 15px 20px !important;
    font-size: 1em !important;
    color: var(--text-main) !important;
    letter-spacing: 0.5px;
    width: 100%;
    margin-bottom: 15px;
    background-color: var(--bg-main);
    transition: all 0.3s ease;
}

.login-box-body form input:focus {
    border-color: var(--primary);
    background-color: var(--bg-surface);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.login-box-body form .content-fluid {
    display: flex !important;
    justify-content: center !important;
}

.login-box-body form button {
    border-radius: var(--radius-sm) !important;
    width: 100% !important;
    text-transform: uppercase;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) !important;
    outline: 0;
    border: none;
    color: rgb(255, 255, 255);
    padding: 15px;
    margin-top: 10px !important;
    font-size: 1em !important;
    letter-spacing: 1px;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
}

.login-box-body form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 20px -3px rgba(79, 70, 229, 0.4);
}

/* RECAPTCHA */
.g-recaptcha {
    position: relative !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    transform: scale(0.95);
    -webkit-transform: scale(0.95);
    margin: 15px 0 !important;
    border-radius: var(--radius-sm) !important;
    overflow: hidden;
}

/* LINK RECUPRERAR CONTRASEÑA */
.link-recuperar {
    padding-top: 20px;
    width: 100%;
    text-align: center;
}

.link-recuperar a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
}

.link-recuperar a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* VERIFICA SUNAT LOGO */
.verifica-sunat {
    padding-top: 20px;
    width: 100%;
    text-align: center;
}

.verifica-sunat img {
    width: 120px;
    text-align: center;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.verifica-sunat img:hover {
    opacity: 1;
}

/* RESULT LOGIN DIV */
#resultLogin {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
}

/* RELOAD */
#reload, #reloadFull2 {
    position: absolute;
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: center !important;
    align-content: center !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(4px);
    z-index: 9999 !important;
}

#reload img {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    box-shadow: var(--shadow-md);
}

.btn-menup {
    height: 50px !important;
    background-color: transparent !important;
    margin-left: 10px !important;
    outline: 0 !important;
    border: none !important;
    color: var(--text-main);
}

.swal2-modal {
    width: 450px !important;
    height: auto !important;
    font-size: 1em !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
    font-family: 'Inter', sans-serif !important;
}

.btns-dash {
    position: relative !important;
    height: auto !important;
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: flex-end !important;
    margin: 0px !important;
    gap: 10px;
}

.btns-dash #contenedor-menur {
    position: relative;
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-end;
    width: 100%;
    gap: 10px;
}

/* CICLO INFINITO DE COLORES PARA EL MENÚ RÁPIDO */
/* Usamos la fórmula (6n + X) para que los colores se repitan en bucle automáticamente */
.btns-dash #contenedor-menur a:nth-child(6n + 1) { background: #3b82f6 !important; color: #fff !important; margin: 0 !important; } /* Azul Info */
.btns-dash #contenedor-menur a:nth-child(6n + 2) { background: var(--success) !important; color: #fff !important; } /* Verde Esmeralda */
.btns-dash #contenedor-menur a:nth-child(6n + 3) { background: var(--secondary) !important; color: #fff !important; } /* Gris Pizarra corporativo */
.btns-dash #contenedor-menur a:nth-child(6n + 4) { background: #f59e0b !important; color: #fff !important; } /* Naranja Warning */
.btns-dash #contenedor-menur a:nth-child(6n + 5) { background: #6366f1 !important; color: #fff !important; } /* Indigo */
.btns-dash #contenedor-menur a:nth-child(6n + 6) { background: var(--primary) !important; color: #fff !important; } /* Turquesa de tu logo */

.btns-dash #contenedor-menur a {
    outline: 0 !important;
    border: none !important;
    border-radius: var(--radius-sm);
    padding: 10px 15px !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600 !important;
    font-size: 0.75em;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btns-dash #contenedor-menur a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md); /* Sombra más profunda al hover */
    filter: brightness(1.1);
}

.btns-dash a i {
    color: rgb(255, 255, 255) !important;
    margin-right: 5px;
}

.menu-user li a {
    padding: 10px 15px;
    color: var(--text-main);
    transition: background 0.2s;
}

.menu-user li a:hover {
    background-color: var(--bg-main);
}

.btns-dash .btn-menur {
    display: none !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm);
    outline: 0 !important;
    padding: 8px 12px !important;
    background: var(--bg-surface) !important;
    color: var(--text-main) !important;
    box-shadow: var(--shadow-sm);
}

#checkm {
    display: none !important;
}

@media (max-width: 767px) {
    .skin-blue .main-header .navbar .dropdown-menu li a {
        color: var(--text-muted) !important;
    }
    .contenedor-widget {
        justify-content: space-between;
    }
    .btns-dash {
        position: relative !important;
        display: flex !important;
        justify-content: center !important;
    }
    .btns-dash .btn-menur {
        display: inline-block !important;
    }
    #contenedor-menur {
        position: absolute !important;
        width: 100% !important;
        top: 100%;
        left: 0;
        flex-direction: column;
        background: var(--bg-surface);
        padding: 15px;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }
    #contenedor-menur a {
        width: 100% !important;
        text-align: center;
    }
    #checkm:checked ~ #contenedor-menur {
        transform: translateY(10px);
        opacity: 1;
        visibility: visible;
    }
}

/* BOTÓNES MODALES FOOTER */
.modal-footer button {
    outline: 0 !important;
    border-radius: var(--radius-sm) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-weight: 600;
    padding: 10px 20px;
    border: none;
}

.reload-all {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    align-content: center;
    z-index: 10000;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(3px);
}

.reload-all img {
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

/* WIDGETS (Cajas de información superiores) */
.contenedor-widget {
    position: relative;
    width: 100%;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: 15px;
    padding: 10px 0;
}

.contenedor-widget .info-box {
    background-color: var(--bg-surface);
    border-radius: var(--radius-md) !important;
    min-height: 80px !important;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
    overflow: hidden;
    margin-bottom: 0 !important;
}

.contenedor-widget .info-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.contenedor-widget .info-box-icon {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100% !important;
    width: 80px !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.contenedor-widget .bg-fa { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff !important; border: none !important;}
.contenedor-widget .bg-bo { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff !important; border: none !important;}
.contenedor-widget .bg-nv { background: linear-gradient(135deg, var(--secondary), #7c3aed); color: #fff !important; border: none !important;}
.contenedor-widget .bg-nc { background: linear-gradient(135deg, #64748b, #475569); color: #fff !important; border: none !important;}
.contenedor-widget .bg-nd { background: linear-gradient(135deg, #eab308, #ca8a04); color: #fff !important; border: none !important;}
.contenedor-widget .bg-tn { background: linear-gradient(135deg, #10b981, #059669); color: #fff !important; border: none !important;}

.contenedor-widget .bg-fa,
.contenedor-widget .bg-bo,
.contenedor-widget .bg-nc,
.contenedor-widget .bg-nd,
.contenedor-widget .bg-nv,
.contenedor-widget .bg-tn {
    background-image: url('../img/payday.svg');
    background-size: 40% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.contenedor_icbper {
    width: 100%;
    display: flex;
    flex-flow: row;
    justify-content: center;
    align-items: center;
    align-content: center;
    margin: 10px 0;
}

/* SWITCHES Y TOGGLES MODERNOS (Estilo Segmented Control) */
.modo-contenedor, .modo-contenedor-email, .modo-contenedor-icbper, .modo-contenedor-unidad {
    display: flex;
    flex-flow: row;
    justify-content: center;
    margin: 0;
    background-color: var(--bg-main);
    border-radius: var(--radius-sm);
    padding: 3px;
    border: 1px solid var(--border-color);
}

.modo-contenedor { width: 180px; }
.modo-contenedor-email, .modo-contenedor-icbper, .modo-contenedor-unidad { width: 120px; }

/* PARA PRECIO POR MAYOR */
.modo-precio-mayor {
    display: flex;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: 140px;
    height: 36px;
    padding: 3px;
}

.modo-precio-mayor input[type="radio"],
.modo-contenedor input,
.modo-contenedor-email input,
.modo-contenedor-icbper input,
.modo-contenedor-unidad input {
    display: none !important;
}

.modo-precio-mayor label,
.modo-contenedor label,
.modo-contenedor-email label,
.modo-contenedor-icbper label,
.modo-contenedor-unidad label {
    flex: 1;
    padding: 5px 10px;
    margin: 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    color: var(--text-muted);
    font-size: 0.8em !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 6px; /* Para que encaje dentro del padding del contenedor */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estados Activos de los Toggles */
#precio_si:checked + label.precio_si { background-color: var(--primary); color: white; box-shadow: var(--shadow-sm); }
#precio_no:checked + label.precio_no { background-color: var(--bg-surface); color: var(--text-main); box-shadow: var(--shadow-sm); }

/* Clases específicas de los toggles originales */
.modo-contenedor #sim, .modo-contenedor-email #sie, .modo-contenedor-icbper .s, .modo-contenedor-unidad .siu { border-radius: 6px; }
.modo-contenedor #nom, .modo-contenedor-email #noe, .modo-contenedor-icbper .n, .modo-contenedor-unidad .nou { border-radius: 6px; }

#emailtext { font-size: 0.9em !important; text-decoration: none !important; font-weight: 500 !important; }

.btn-modo-sistema {
    padding: 5px 15px;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Colores de selección activa en toggles antiguos (adaptados) */
.prod { background-color: #10b981 !important; color: white !important; box-shadow: var(--shadow-sm); }
.emailsi { background-color: var(--primary) !important; color: white !important; box-shadow: var(--shadow-sm); }
.emailno { background-color: var(--bg-surface) !important; color: var(--text-main) !important; box-shadow: var(--shadow-sm); }
.icbsi { background-color: var(--primary) !important; color: white !important; box-shadow: var(--shadow-sm); }
.icbno { background-color: var(--bg-surface) !important; color: var(--text-main) !important; box-shadow: var(--shadow-sm); }
.unidadsi { background-color: var(--primary) !important; color: white !important; box-shadow: var(--shadow-sm); }
.unidadno { background-color: var(--bg-surface) !important; color: var(--text-main) !important; box-shadow: var(--shadow-sm); }

.btnprod { color: white; border: none !important; background-color: #10b981 !important; border-radius: var(--radius-sm); }
.prueba { background-color: var(--accent) !important; color: white !important; box-shadow: var(--shadow-sm); }
.btnprueba { color: white; border: none !important; background-color: var(--accent) !important; border-radius: var(--radius-sm); }

.alterno { background-color: var(--bg-surface) !important; color: var(--text-main) !important; }
.alterno2 { background-color: var(--bg-surface) !important; color: var(--text-main) !important; }

/* DIV COMPROBAR CONEXIÓN A INTERNET */
.connection {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background-color: var(--bg-surface);
    z-index: 10000;
    color: var(--text-main);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    font-weight: 500;
    font-size: 0.9em;
}

.contenedor-selva {
    width: 100%;
    position: relative;
    display: flex;
    flex-flow: row;
    background-color: var(--bg-surface);
    justify-content: center;
    padding: 15px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

/* TABLA DE VENTAS Y PRECIOS */
.tablaVentas .super-contenedor-precios {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-flow: row wrap !important;
    top: 0;
    left: 0;
    background-color: var(--bg-surface);
    justify-content: center;
    align-content: center;
    z-index: 99 !important; /* Ajustado z-index */
    padding: 15px !important;
    box-sizing: border-box;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.tablaVentas .contenedor-precios {
    position: relative;
    display: flex;
    flex-flow: column;
    margin: 10px;
    width: 45%;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    padding-bottom: 10px;
    border: 1px solid var(--border-color);
}

.tablaVentas .desc-productos {
    position: relative;
    width: 100% !important;
    text-align: center;
    background-color: var(--bg-surface);
    color: var(--primary);
    font-weight: 600;
    padding: 10px;
    white-space: normal;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border-bottom: 1px solid var(--border-color);
}

.tablaVentas .number {
    outline: 0 !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    padding: 8px !important;
    font-size: 1.1em !important;
    width: 90px;
    text-align: center;
    background: var(--bg-surface);
    color: var(--text-main);
    transition: border-color 0.3s;
}

.tablaVentas .number:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.tablaVentas .contenedor-precios .pre-css {
    margin: 10px auto !important;
    outline: 0 !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    padding: 5px 15px !important;
    font-size: 1.1em !important;
    width: 90%;
    height: 40px !important;
    background: var(--bg-surface);
    color: var(--text-main);
}

.tablaVentas .btn-prod {
    width: auto !important;
    padding: 8px 15px !important;
    border-radius: var(--radius-sm);
}

.tablaVentas .contenedor-precios label {
    margin: 5px 0 0 15px !important;
    text-transform: uppercase;
    letter-spacing: 1px !important;
    font-size: 0.75em;
    color: var(--text-muted);
}

.tablaVentas .btn-grupos {
    position: relative !important;
    text-align: center;
    padding-top: 10px;
}

@media (max-width: 520px) {
    .super-contenedor-precios {
        flex-flow: column !important;
        overflow-y: auto !important;
    }
    .tablaVentas .contenedor-precios {
        width: 100%;
        margin: 10px 0;
    }
}

.tabla-items tbody tr td {
    text-align: center;
    font-size: 1em;
    padding: 10px !important;
    background-color: var(--bg-surface) !important;
    color: var(--text-main);
    /* Línea punteada, más gruesa (2px) y de un tono gris más notorio */
    border-bottom: 2px dashed #94a3b8 !important; 
}

.tbl-t th {
    font-weight: 600 !important;
    font-size: 0.8em !important;
    letter-spacing: 0.5px !important;
    text-align: center !important;
    color: var(--text-muted);
}

/* ESTADOS SUNAT (Estilo Badges modernos) */
.contenedor-estados-sunat {
    display: flex;
    flex-flow: row wrap;
    background-color: transparent;
    gap: 10px;
}

.contenedor-estados-sunat div {
    position: relative;
    padding: 6px 12px 6px 30px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    font-size: 0.85em;
}

.contenedor-estados-sunat label {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    padding: 0;
}

.contenedor-estados-sunat .sunat-estado {
    font-weight: 500;
    color: var(--text-main);
}

.contenedor-estados-sunat .estadosunat {
    background-image: url(../img/sunat_logo.png) !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.contenedor-estados-sunat .aceptado {
    background-image: url(../img/svg/success.svg) !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.contenedor-estados-sunat .rechazado {
    background-image: url(../img/svg/rechazo.svg) !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.contenedor-estados-sunat .baja {
    background-image: url(../img/svg/error.svg) !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.contenedor-estados-sunat .noenviado {
    background-image: url(../img/svg/get_cdr.svg) !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/*/////////////////////////*/
/*PARA REPORTE GRAFICOS///*/
/*/////////////////////////*/
.reportes-wrapper {
    padding: 20px;
    background-color: transparent;
}

.reportes-panel {
    margin-bottom: 25px;
}

.reportes-box {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    background-color: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.reportes-rounded {
    border-radius: var(--radius-md);
}

.reportes-box-header {
    background-color: var(--bg-surface);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.reportes-box-title {
    font-size: 1.1em;
    margin: 0;
    font-weight: 600;
    color: var(--text-main);
}

.reportes-box-body {
    padding: 20px;
}

.reportes-chart-responsive {
    position: relative;
    width: 100%;
    height: auto;
}

.reportes-chart-ventas .reportes-box-primary { border-top: 3px solid var(--primary); }
.reportes-chart-ventas .reportes-box-success { border-top: 3px solid #10b981; }
.reportes-chart-ventas .reportes-box-info { border-top: 3px solid #3b82f6; }
/*FIN DE REPORTE GRAFICOS*/





