/* ===============================
   ESTILOS GENERALES
================================ */

body{
margin:0;
font-family:Arial, Helvetica, sans-serif;
background:#ecf0f1;
}

/* ===============================
   LOGO
================================ */

.logo-container{
text-align:center;
margin-bottom:15px;
}

.logo{
width:100px;
}

/* ===============================
   SIDEBAR APP
================================ */

.sidebar-app{
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: #aba9a9;
    padding: 0px;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(132, 127, 127, 0.2);
    z-index: 1000;
    box-sizing: border-box;
    overflow-y: auto;
}
.sidebar-app nav{
margin-top:40px;
display:flex;
flex-direction:column;
gap:15px;
}

.sidebar-app nav a{
color:#151617;
text-decoration:none;
display:flex;
align-items:center;
gap:10px;
padding:0px;
border-radius:6px;
transition:.2s;
}
.sidebar-app nav a i{
width:22px;
text-align:center;
font-size:16px;
color:#1a91f3; /* color del icono */
}

.sidebar-app nav a:hover{
background:#37474f;
}


.sidebar-app .salir{
color:#dc2626;
}


/* ===============================
   TOPBAR
================================ */

.topbar{
position:fixed;
top:0;
left:220px;
right:0;
height:80px;
background:white;
display:flex;
align-items:center;
justify-content:space-between;
padding:0 40px;
box-shadow:0 4px 12px rgba(0,0,0,0.08);
z-index:900;
}

.topbar-left h4{
margin:0;
font-size:26px;
font-weight:600;
color:#263238;
}

.topbar-user{
display:flex;
align-items:center;
gap:15px;
}

.usuario-nombre{
font-size:16px;
font-weight:500;
}

.avatar{
width:45px;
height:45px;
border-radius:50%;
object-fit:cover;
border:2px solid #eee;
}

/* ===============================
   CONTENIDO
================================ */

.main-content{
margin-left:170px;
margin-top:40px;
padding:70px;
width:calc(100% - 250px);
}

.catalogo-container{
max-width:1200px;
margin-left:0;
}

.catalogo-container .row{
display:flex;
flex-wrap:wrap;
justify-content:flex-start;
}

/* ===============================
   MARCA DE AGUA
================================ */


/* ===============================
   FORMULARIOS
================================ */

.form-group{
margin-bottom:20px;
}

label{
display:block;
font-weight:bold;
margin-bottom:5px;
}

.form-control{
width:100%;
padding:12px;
border-radius:8px;
border:1px solid #d1d5db;
font-size:15px;
}

.form-control:focus{
border-color:#5c6bc0;
outline:none;
box-shadow:0 0 6px rgba(92,107,192,0.25);
}

/* ===============================
   BOTONES
================================ */

.btn-sistema{
padding:10px 16px;
border-radius:8px;
border:none;
font-size:14px;
cursor:pointer;
text-decoration:none;
display:inline-block;
margin:2px;
}

.btn-guardar{
background:#198754;
color:white;
}

.btn-guardar:hover{
background:#3f51b5;
}

.btn-editar{
background:#3f51b5;
color:white;
}

.btn-editar:hover{
background:#3f51b5;
}

.btn-eliminar{
background:#dc6a6a;
color:white;
}

.btn-eliminar:hover{
background:#d32f2f;
}

/* ===============================
   TABLAS
================================ */

.tabla-sistema{
width:100%;
border-collapse:separate;
border-spacing:0;
background:white;
border-radius:12px;
overflow:hidden;
box-shadow:0 8px 20px rgba(0,0,0,0.08);
margin:auto;
}

/* HEADER */

.tabla-sistema thead{
background:#37474f;
color:white;
}

.tabla-sistema th{
padding:16px;
text-align:left;
font-weight:600;
font-size:15px;
}

/* FILAS */

.tabla-sistema td{
padding:16px;
border-bottom:1px solid #eee;
font-size:14px;
color:#333;
}

/* HOVER */

.tabla-sistema tbody tr{
transition:0.2s;
}

.tabla-sistema tbody tr:hover{
background:#f7f9fc;
transform:scale(1.002);
}
/* ===============================
   ESTADOS
================================ */

.estado-activo{
color:green;
font-weight:bold;
}

.estado-inactivo{
color:red;
font-weight:bold;
}

/* ===============================
   ACCIONES
================================ */

.acciones{
display:flex;
gap:5px;
}

/* ===============================
   MODAL
================================ */

.modal{
display:none;
position:fixed;
z-index:2000;
inset:0;
background-color:rgba(0,0,0,0.6);
}

.modal-contenido{
background:white;
margin:5% auto;
border-radius:15px;
width:90%;
max-width:600px;
padding:30px;
box-shadow:0 6px 20px rgba(0,0,0,0.25);
}

.cerrar{
float:right;
font-size:28px;
cursor:pointer;
}
.modal.mostrar {
    display: flex;
}

/* ===============================
   GRID FORMULARIO MODAL
================================ */

.form-grid-3{
display:grid;
grid-template-columns:repeat(3,1fr);
gap:15px;
margin-bottom:15px;
}

.form-grid-3 input,
.form-grid-3 select{
width:100%;
padding:100px;
border-radius:6px;
border:1px solid #d1d5db;
background:#F9FAFB;
font-size:14px;
}

.form-grid-3 input:focus,
.form-grid-3 select:focus{
outline:none;
border-color:#9CA3AF;
background:white;
}

/* ===============================
   HEADER USUARIO
================================ */

.user-header{
max-width:1100px;
background:white;
padding:18px 25px;
border-radius:12px;
box-shadow:0 4px 12px rgba(0,0,0,0.08);
margin-bottom:30px;
}

.user-info{
display:flex;
align-items:center;
gap:15px;
}

.user-avatar{
width:50px;
height:50px;
border-radius:50%;
object-fit:cover;
}

/* ===============================
   PRODUCTOS
================================ */

.card-producto{
transition:.2s;
}

.card-producto:hover{
transform:translateY(-4px);
box-shadow:0 8px 20px rgba(0,0,0,0.1);
}

/* ===============================
   PAGINACION
================================ */

.paginacion-container{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    margin-top:30px;
}

/* ================= BOTONES ================= */
#paginacion button,
.pag-btn{
    background:#F1F3F5;       
    border:1px solid #DEE2E6;
    padding:6px 12px;
    border-radius:6px;
    cursor:pointer;
    color:#495057;
}

/* ================= HOVER ================= */
#paginacion button:hover,
.pag-btn:hover{
    background:#E9ECEF;
}

/* ================= ACTIVO ================= */
#paginacion button.activo{
    background:#DEE2E6;
    font-weight:bold;
}

/* ================= BOOTSTRAP ================= */
.pagination .page-link {
    background:#F1F3F5;
    color:#495057;
    border:1px solid #DEE2E6;
}

/* HOVER */
.pagination .page-link:hover {
    background:#E9ECEF;
    color:#212529;
}

/* ACTIVO */
.pagination .page-item.active .page-link {
    background:#0D6EFD;   
    border-color:#0D6EFD;
    color:white;
}

/* ================= CONTENEDOR ================= */
#paginacion {
    min-height:60px;
    display:flex;
    justify-content:center;
    align-items:center;
}
.contenedor-carrito {
    margin-left: 100px; /* AJUSTA al ancho de tu menú */
    padding: 20px;
}
/* ===============================
   RESPONSIVE
================================ */

@media(max-width:768px){

.sidebar-app{
width:100%;
height:auto;
position:relative;
}

.topbar{
left:0;
}

.main-content{
margin-left:0;
margin-top:120px;
}

}

/* ===== MODAL PROVEEDOR ===== */

.modal-proveedor{
    border-radius: 12px;
    overflow: hidden;
}

/* HEADER */
.modal-header-proveedor{
    background: #9499a0;
    color: white;
    padding: 20px;
    position: relative;
}

.modal-header-proveedor h5{
    margin-top: 10px;
    font-weight: bold;
}

.logo-modal{
    width: 80px;
    display: block;
    margin: 0 auto;
}

/* BODY */
.modal-body{
    padding: 20px;
}

.form-group{
    margin-bottom: 15px;
}

.form-group label{
    font-weight: 600;
    margin-bottom: 5px;
}

.form-control{
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* FOOTER */
.modal-footer-proveedor{
    border-top: none;
    padding: 15px 20px;
    text-align: right;
}

/* BOTON */
.btn-guardar-proveedor{
    background: #9499a0; 
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    transition: 0.3s;
}

.btn-guardar-proveedor:hover{
    background: #9499a0;
}
.table-responsive{
    width: 100%;
    overflow-x: auto;
}

.tabla-sistema{
    min-width: 900px;
    width: 100%;
}

.tabla-sistema th,
.tabla-sistema td{
    white-space: nowrap;
}

/* ===== FIX MODAL FORM ===== */
.form-grid-3{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* INPUTS DEL MODAL */
.form-grid-3 input,
.form-grid-3 select{
    width: 100%;
    height: 38px;
    padding: 6px 10px;
    border-radius: 6px;
    border:1px solid #d1d5db;
    font-size: 14px;
}

/* TEXTAREA CONTROLADO */
.form-grid-3 textarea{
    width: 100%;
    height: 80px;
    resize: none;
    padding: 8px;
}

/* RESPONSIVE */
@media (max-width: 768px){
    .form-grid-3{
        grid-template-columns: 1fr;
    }
}

/* ===== FIX VISUAL INPUTS MODAL ===== */

#modalRegistro .form-grid-3 input,
#modalRegistro .form-grid-3 select {
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #000 !important;
}

/* FOCUS (cuando escribes) */
#modalRegistro .form-grid-3 input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* VALIDACIONES */
#modalRegistro .form-grid-3 input.valid {
    border: 2px solid #28a745 !important;
    background-color: #e9f7ef !important;
}

#modalRegistro .form-grid-3 input.invalid {
    border: 2px solid #dc3545 !important;
    background-color: #fdecea !important;
}

.btn-pag{
    margin: 3px;
    padding: 5px 10px;
    border: none;
    background: #ccc;
    cursor: pointer;
}

.btn-pag.activo{
    background: #007bff;
    color: white;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {

    .sidebar-app {
        position: relative;
        width: 100%;
        height: auto;
    }

    .main-content {
        margin-left: 0;
        padding: 10px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .row {
        flex-direction: column;
    }

}

/* TABLAS RESPONSIVAS */

.table-pro, .tabla-sistema {
    width: 100%;
    border-collapse: collapse;

}

/* CONTENEDORES */

.container, .card, .catalogo-container {
    max-width: 100%;
    overflow-x: auto;
}