* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    background-color: #f5f5f5;
    color: #333;
    /* QUITAR: display: flex; */
}

.bod2 {

    width: 100%;
    height: 600px;


}

/*login*/

.imlog {
    width: 200px;
    height: auto;
}

.ce {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    border: 2px solid black;
    background-color: #ccc;
}


.contbod {

    width: 50%;
    height: 500px;
    display: flex;
    justify-content: center;
    padding-top: 50px;
}


.contlog {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    width: 50%;
    height: 300px;
    text-align: center;
    display: block;
}

.contlog2 {

    padding: 30px;
    border-radius: 12px;
    width: 50%;
    height: 200px;
    text-align: center;
    display: block;
    background-color: #ccc;
}

h1 {
    margin: 30px 0px 30px 20px;
    font-size: 30px;
}

.btn {
    width: 100%;
    padding: 12px;
    background-color: orange;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.btn:hover {
    background-color: #51142f;
}

.contcab {
    width: 100%;
    height: 100px;
    background-color: white;
    color: black;
}

.black {
    color: black;
}



.contbod2 {
    border: 1px black solid;
    width: calc(100vw - 250px);
    height: auto;
    /* Altura automática */
    min-height: 100vh;
    /* Mínimo altura de ventana */
    display: flex;
    flex-direction: column;
    margin-left: 250px;
    box-sizing: border-box;
}


h2 {
    margin-bottom: 20px;
    color: #333;
}

.continp {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
}

.imgin {
    width: 60%;
    height: auto;
    border-radius: 3%;
    margin: 25px;
}



.contin2 {
    border: 1px gainsboro solid;
    background-color: white;
    width: 70%;
    height: 700px;
    margin: 10px 30px;
}

/*INICIO*/

.selector-negocios {
    padding: 40px 20px;
    text-align: center;
}

.titulo-selector {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 40px;
}

.grid-botones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.btn-negocio {
    display: block;
    padding: 20px;
    background: linear-gradient(135deg, orange 0%, #ff8c00 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
}

.btn-negocio:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 165, 0, 0.4);
    background: linear-gradient(135deg, #ff8c00 0%, #ff7700 100%);
}

.btn-negocio:active {
    transform: translateY(-2px);
}


/*barra lateras*/
.contin1 {
    border: 1px orange solid;
    width: 20%;
    height: 100%;
    margin: 10px 30px;
}


.barralateral {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background-color: #333;
    color: white;
    box-sizing: border-box;
    z-index: 1000;

}

.contenido {
    margin-left: 250px;
    padding: 20px;
    width: calc(100vw - 250px);
    max-width: calc(100vw - 250px);
    overflow-x: auto;
    min-height: 100vh;
}


.imgin2 {
    width: 50%;
    height: auto;
    border-radius: 3%;
    margin: auto;
    display: flex;
    justify-content: center;
}

.logo {
    width: 150px;
    height: 150px;
    background-color: white;
    /* Color blanco */
    -webkit-mask-image: url('logo.png');
    mask-image: url('logo.png');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.fp {
    width: 100%;
    height: 15%;
    display: block;
    padding: 20px 10px;
    color: white;
}

.fp:hover {
    background-color: orange;
}

a {
    text-decoration: none;
}

ul {
    margin-top: 30px;
    list-style: none;
}


li {
    margin-top: 30px;
}



.boton-cerrar-sesion {
    position: fixed;
    /* Cambiar de absolute a fixed */
    bottom: 20px;
    left: 20px;
    width: 210px;
}

.btn-cerrar {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;

}

.btn-cerrar:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
}



.contl {

    width: 100%;
    height: auto;
    display: block;
    text-align: center;
}

.contl2 {

    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/*productos*/

.contin3 {
    border: 1px gainsboro solid;
    background-color: white;
    width: 70%;
    height: 200px;
    margin: 10px 30px;
    display: block;
}

.contl4 {

    width: 80%;
    height: 50px;
    display: block;
    text-align: center;
    margin: 0% 10%;
    padding: 10px;
}

.contl13 {
    width: 100%;
    height: 50px;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 30px;
    display: flex;
    justify-content: center;

}

.botones-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
    /* Agregar esta línea */
}

.boton2 {
    background-color: orange;
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    text-align: center;
    border: 1px white solid;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 200px;
    height: 50px;
    box-sizing: border-box;

}

.boton2:hover {
    background-color: hsl(260, 78%, 16%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}





.contin4 {
    border: 1px #ccc solid;
    background-color: white;
    width: 95%;
    height: auto;
    /* Cambiar de 1000px a auto */
    margin: 30px 25px;
    display: block;
}

.contl44 {

    width: 80%;
    height: 50px;
    display: block;
    text-align: center;
    margin: 0% 10%;
    padding: 10px;
}


form {
    max-width: 600px;
    margin: 0 auto;
}

.inp {
    width: 100%;
    height: 30px;
    padding: 10px;
    margin: 10px 500px 0px 0px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.dia {
    margin-bottom: 10px;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 8px;
    display: none;
}


textarea {
    resize: vertical;
    height: 100px;
    font-family: monospace;
}

.dias {
    text-align: center;
    margin-top: 10px;
    background-color: #eee;
    padding: 10px 0;
    border-radius: 3px;
}

.opdias {
    display: flex;
    justify-content: space-around;
    margin: 10px 0;
}

.oprad {
    text-align: center;
}

.inptex {
    width: 100%;
    height: 100px;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}



.btnguar2 {
    width: 30%;
    height: 40px;
    background-color: hsl(260, 78%, 16%);
    color: white;
    padding: 10px;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    margin-bottom: 20px;
}

.btnguar2:hover {
    background-color: orange;
}

.contvac {
    clear: both;
    width: 100%;
    height: 200px;
}

.pie {

    width: 100%;
    height: 150px;
    background-color: orange;
}


table {
    border: 1px black solid;
    width: 100%;
    /* Cambiar de 90% a 100% */
    margin: 0;
    /* Quitar márgenes laterales */
    box-sizing: border-box;
}

th,
td {
    border: 1px black solid;
    width: 5px;
    height: 20px;
    padding: 5px;
    text-align: center;
    font-size: 10px;
}

th {
    background-color: #333;
    color: rgb(233, 229, 229);
}

.imb {
    width: 20%;
    height: auto;
}

.im2 {
    width: 100%;
    height: auto;
}




.subcategory-container {
    display: none;
    margin-top: 10px;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.subcategory-container.show {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Estilos mejorados para la tabla y filtros */
.filtros-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filtros-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filtro-grupo {
    display: flex;
    flex-direction: column;
    min-width: 200px;

}

.filtro-grupo label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.filtro-input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.filtro-input:focus {
    outline: none;
    border-color: #007bff;
}

.btn-limpiar {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    align-self: flex-end;
}

.btn-limpiar:hover {
    background: #5a6268;
}

.tabla-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tabla-productos {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tabla-productos th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tabla-productos td {
    padding: 5px 5px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.tabla-productos tr:hover {
    background-color: #f8f9fa;
}

.tabla-productos tr:nth-child(even) {
    background-color: #fdfdfd;
}

.precio {
    font-weight: bold;
    color: #28a745;
}

.precio-compra {
    color: #dc3545;
}

.acciones {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.btn-accion {
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    /* Agregar para controlar el layout interno */
    align-items: center;
    /* Centrar contenido verticalmente */
    gap: 5px;
    /* Espacio entre imagen y texto */
    min-width: 80px;
    /* Ancho mínimo para uniformidad */
    justify-content: center;
    /* Centrar contenido */
}

.btn-editar {
    background: #17a2b8;
    color: white;
}

.btn-editar:hover {
    background: #138496;
    transform: translateY(-1px);
}

.btn-eliminar {
    background: #dc3545;
    color: white;
    margin-bottom: 25px;
}

.btn-eliminar2 {
    background: #dc3545;
    color: white;
}

.btn-eliminar2:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-eliminar:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.no-resultados {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.contador-productos {
    margin: 15px 0;
    font-weight: bold;
    color: #333;
}

.categoria-badge {
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.paginacion {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
}

.paginacion button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.paginacion button:hover {
    background: #007bff;
    color: white;
}

.paginacion button.activo {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.tabla-scroll {
    max-height: 400px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .filtros-row {
        flex-direction: column;
    }

    .filtro-grupo {
        width: 100%;
    }

    .tabla-productos {
        font-size: 12px;
    }

    .tabla-productos th,
    .tabla-productos td {
        padding: 8px 6px;
    }
}


/*alta venta*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.user-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.user-info div {
    display: inline-block;
    margin-right: 30px;
    font-size: 1.1em;
}

.form-container {
    padding: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.productos-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    border: 2px dashed #dee2e6;
}

.productos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.productos-header h3 {
    color: #333;
    font-size: 1.5em;
}

.btn-agregar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-agregar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.producto-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #4facfe;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.producto-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: end;
}

.btn-eliminar {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.btn-eliminar:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.total-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
}

.total-display {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa726 100%);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.no-productos {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
}

.resumen {
    background: #e8f4fd;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #4facfe;
}

.resumen h4 {
    color: #333;
    margin-bottom: 15px;
}

.resumen-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #ddd;
}

.resumen-item:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 1.1em;
    color: #2c3e50;
}

.precio-display {
    background: #e8f5e8;
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #c3e6c3;
    font-weight: bold;
    color: #2d5a2d;
}



/*filtrar ventas*/
.filtro-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.filtro-form {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: nowrap;
}

.form-group {
    display: flex;
    flex-direction: column;
}


.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #495057;
}

.form-group input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.btn-filtrar {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    height: fit-content;
    margin-bottom: 25px;
}

.btn-filtrar:hover {
    background: #0056b3;
}

.btn-limpiar {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    height: fit-content;
    margin-bottom: 25px;
}

.btn-limpiar:hover {
    background: #545b62;
}

.btn-limpiar2 {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    height: fit-content;
}

.btn-limpiar2:hover {
    background: #545b62;
}

.resumen-container {
    background: #e9ecef;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.resumen-totales {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.total-card {
    background: white;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.total-card h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 14px;
}

.total-card .cantidad {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

.categoria-section {
    background: white;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.categoria-header {
    background: #007bff;
    color: white;
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.categoria-header:hover {
    background: #0056b3;
}

.categoria-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.categoria-content.active {
    max-height: 2000px;
    padding: 15px;
}

.producto-item {
    background: #f8f9fa;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.producto-info {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    gap: 10px;
    align-items: center;
}

.producto-nombre {
    font-weight: bold;
    color: #495057;
}

.producto-stat {
    text-align: center;
    font-size: 14px;
}

.producto-stat .label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 2px;
}

.producto-stat .value {
    font-weight: bold;
    color: #495057;
}

.ganancia-positiva {
    color: #28a745;
}

.ganancia-negativa {
    color: #dc3545;
}

.sin-resultados {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .filtro-form {
        flex-direction: column;
        align-items: stretch;
    }

    .producto-info {
        grid-template-columns: 1fr;
        gap: 5px;
        text-align: center;
    }

    .resumen-totales {
        grid-template-columns: 1fr;
    }
}