body {
    font-family:'Times New Roman', Times, serif ;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-image: url("../imagenes/fondo azul.jpg") !important;
    color: white;
}

.btn-rojo {
    background-color: red !important;   
    color: white;           
    border: none;            
    padding: 10px 20px;      
    cursor: pointer;         
    border-radius: 5px;      
}


.btn-verde {
    background-color: rgb(22, 216, 125) !important;  
    color: white;            
    border: none;            
    padding: 10px 20px;      
    cursor: pointer;         
    border-radius: 5px;      
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.login-box {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 300px;
}

.login-box p a{
    color: white;
}
.input-group {
    margin-bottom: 15px;
    text-align: left;
}
.input-group label {
    display: block;
    margin-bottom: 5px;
}
.input-group input {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 5px;
    background: #3a3a3a;
    color: white;
}
button {
    width: 100%;
    padding: 10px;
    background: #007bff;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
}
button:hover {
    background: #0056b3;
}
.question {
    margin-top: 10px;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;

}

#ma-body {
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1000;
    background: white; 
    color: black;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    font-family: Arial, sans-serif;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 50px; 
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ccc; 
    transition: 0.3s;
    margin-right: 10px
}

.logo img:hover {
    border-color: #007bff;
}


.logo span {
    font-size: 18px;
    font-weight: bold;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px; 
    margin-right: 30px; 
    position: relative;
    
}


#user-name {
    font-size: 16px;
    margin-right: 15px;
    font-weight: bold;
}

.panel-btn, .logout-btn {
    background: #007bff;
    color: black;
    border: none;
    padding: 8px 12px;
    margin-left: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
}

.panel-btn:hover, .logout-btn:hover {
    background: #0056b3;
}


.perfil {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #ccc;
    transition: 0.3s;
}

.perfil img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.perfil:hover {
    border-color: #007bff;
}

#dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    z-index: 1050 !important;
}



.dropdown-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-menu ul li {
    text-align: center;
    transition: background 0.3s;
    padding: 8px 15px;
    cursor: pointer;
    white-space: nowrap;
}

.dropdown-menu ul li:hover {
    background: #f0f0f0;
}

.dropdown-menu ul li a {
    text-decoration: none;
    color: black;
    display: block;
    font-size: 14px;
}

/* ===== RESPONSIVE: Ajustes en móviles ===== */
@media screen and (max-width: 768px) {
    #dropdown-menu {
        right: 10px;         /* deja un pequeño margen del borde */
        left: auto;
        width: auto;
        max-width: 90vw;     /* nunca salga de la pantalla */
    }
}


#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #f0f0f0; /* Color gris claro */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    font-family: Arial, sans-serif;
}

/* Estilos del logo */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ccc;
    margin-right: 10px;
}

.logo span {
    font-size: 18px;
    font-weight: bold;
}

.opciones {
    display: flex;
    align-items: center;
    gap: 8px; 
}


.opciones button {
    background: transparent;
    justify-content: center;
    border: none;
    color: black;
    font-size: 16px;
    padding: 8px 10px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
}

.opciones button a{
    background: transparent;
    border: none;
    color: black;
    font-size: 16px;
    padding: 10px 15px;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
    text-decoration: none;
    font-size: 12px;
}

.opciones button:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    
}



.perfil {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #ccc;
    transition: 0.3s;
}

#perfil-btn{
    cursor: pointer;
}

.perfil img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.perfil:hover {
    border-color: #007bff;
}


.dropdown-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    width: 150px;
    display: none;
}


.dropdown-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-menu ul li {
    padding: 10px;
    text-align: center;
    transition: background 0.3s;
}

.dropdown-menu ul li:hover {
    background: #f0f0f0;
}

.dropdown-menu ul li a {
    text-decoration: none;
    color: black;
    display: block;
    font-size: 14px;
}


@media screen and (max-width: 768px) {

    .btn-volver{
        display: none;
    }
    
    .opciones {
        display: none;
    }

    .perfil {
        position: absolute;
        top: -20px;
        right: 20px;
        cursor: pointer;
    }

    .dropdown-menu {
        display: none; 
        position: absolute;
        top: 60px;
        right: 0;
        background: white;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        border-radius: 8px;
        width: 150px;
        z-index: 999;
    }

    .dropdown-menu.active {
        display: block; 
    }
}

@media screen and (min-width: 769px) {
    .opciones {
        display: flex;
    }
}


.desplegable {
    position: absolute;
    top: 60px;  
    left: 6px;  
}

.desplegable button {
    display: none;
}

@media (max-width: 768px) {
    .desplegable button {
        display: inline-block;  
        background-color: transparent;
        border: none;
        cursor: pointer;
        font-size: 24px;  
    }

    .desplegable button i {
        color: white;  
    }

  
}


.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #333;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar ul li {
    padding: 8px 16px;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    display: block;
    transition: 0.3s;
}

.sidebar ul li a:hover {
    background-color: #575757;
}

.sidebar.open {
    width: 250px; 
}


.desplegable button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 24px;
    transition: transform 0.5s; 
}

.desplegable button.move-right {
    transform: translateX(260px); 
}



.informacion-central {
    margin-top: 100px;                 
    padding: 20px;
    height: calc(100vh - 100px);      
    overflow-y: auto;                  
    width: 100%;
}

.tarjetas {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* tarjetas se ajustan y bajan */
    gap: 10%;             /* separación entre tarjetas */
    width: 100%;
    max-width: 100%;
    margin: 0;
}

/* ===== TARJETA INDIVIDUAL ===== */
.tarjeta {
    background-color: #f4f4f4;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 100%;
    max-width: none;
    margin: 0;           /* quita márgenes que rompen el grid */
}



.tarjeta a{
    text-decoration: none;
}

.tarjeta:hover {
    transform: translateY(-10px);
}

.tarjeta h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #1a1a1a;
}

.tarjeta p {
    font-size: 1rem;
    color: #666;
}

.tarjeta img {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
}


.style-inv{
    margin-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100%;
    padding: 20px;
}

.style-inv h1{
    position: absolute;
    top: 70px; 
    left: 5%;
    color: white !important;
    font-size: 25px;
}


.barra-busqueda {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: #fff;
    border-radius: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin: 60px 20px 20px auto; 
    padding: 4px 8px;
    box-sizing: border-box;
}

.barra-busqueda input {
    flex: 1;
    border: none;
    outline: none;
    padding: 5px 10px;
    border-radius: 25px 0 0 25px;
    font-size: 14px;
}

.barra-busqueda button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #101111f3;
    color: #fff;
    border: none;
    border-radius: 0 25px 25px 0;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 25px;
}

.barra-busqueda button:hover {
    background: #0056b3;
}

.barra-busqueda i {
    font-size: 16px;
}


.contenedor-tabla {
    width: 100%;
    overflow-x: auto;
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    height: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    flex: 1;
    overflow-y: auto;

}

#tabla {
    min-width: 100%;
    width: max-content; /* Asegura que la tabla pueda crecer horizontalmente */
    border-collapse: collapse;
    font-size: 10px;
    background-color: #1f1f1f;
    color: white;
    border-radius: 10px;
    overflow: auto;
    height: max-content;
}

.header {
    position: relative; /* esto permite que el dropdown se posicione dentro del header */
    z-index: 1000;     /* se asegura que esté sobre otros elementos */
}

#tabla thead {
    font-size: 14px;
    background-color: #007bff;
    color: white;
}

#tabla th,
#tabla td {
    padding: 6px 8px;
    text-align: center;
    border-bottom: 1px solid #444;
    cursor: pointer;
}

#tabla tbody tr:hover {
    background-color: #333;
}

/* Personaliza los botones y paginación de DataTables */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 6px 12px;
    background-color: #444;
    color: white !important;
    border: none;
    margin: 0 2px;
    border-radius: 5px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #007bff;
    color: white !important;
}

.dataTables_length,
.dataTables_filter {
    color: white;
}

.dataTables_filter input {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 5px;
}

.dataTables_info {
    color: white;
}

.tabla-opciones {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
     /* Color de fondo (opcional) */
    padding: 8px 10px;
    display: flex;
    justify-content: center; /* Centra los botones horizontalmente */
    gap: 10px; /* Espacio entre botones */
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1); /* Sombrilla sutil */
    z-index: 1000; /* Asegura que quede encima de otros elementos */
    
}

.tabla-opciones  button {
    padding: 5px 8px;
    font-size: 14px;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: auto;
    min-width: 70px;
}

.tabla-opciones  button:hover {
    background-color: #0056b3;
}

.hidden {
    display: none;
}

  .formulario {
    position: absolute;
    top: 50px;
    left: 10%;
    width: 70%;
    height: auto;
    margin: 50px auto;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
  }

  .formulario h3 {
    position: relative;
    top: -30px;
    text-align: center;
    color: #333333;
    margin-bottom: -40px;
  }

  .formulario h6{
    color: black;
  }

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

  .formulario label {
    font-size: 10px;
    margin-top: 11px;
    margin-bottom: 4px;
    font-weight: bold;
    color: #555;
  }

  .formulario input[type="text"],
  .formulario input[type="number"],
  .formulario input[type="date"],
  .formulario input[type="password"],
  .formulario input[type="file"]{
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
  }

  .formulario select{
    padding: 7px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
   
  }

  .formulario input:focus {
    border-color: #007BFF;
    outline: none;
  }

  .formulario button {
    margin-top: 10px;
    padding: 10px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .formulario button:hover {
    background-color: #0056b3;
  }

  .click-opciones{
    display:none;
    position:absolute;
    background:white;
    border:1px solid #ccc;
    box-shadow:0 2px 8px rgba(0,0,0,0.2);
    z-index:1000;
  }

  .click-opciones ul{
    list-style:none;
    margin:0;
    padding:10px;
    }

    .click-opciones li {
        text-decoration: none;
        padding: 10px;
        color: black;
        cursor: pointer;
    }

    table {
        -webkit-user-select: none; /* Safari */
        -moz-user-select: none;    /* Firefox */
        -ms-user-select: none;     /* Internet Explorer/Edge */
        user-select: none;         /* Estándar */
      }

  .submenu {
    display: none; /* Ocultar los submenús por defecto */
    list-style-type: none;
    margin: 0;
    padding: 0;
    }

    .sidebar ul li:hover .submenu {
        display: block; /* Mostrar el submenú al pasar el ratón o al hacer clic */
        position: relative;
        margin-left: 20px; /* Opcional: añadir sangría */
    }

 



/* vista para mobiles */
@media screen and (max-width: 768px) {

     .tarjetas {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* menos ancho mínimo */
        gap: 15px;    /* separación más pequeña */
    }

    .tarjeta {
        padding: 5px;       /* reduce padding para que quepan */
        font-size: 0.5rem;   /* texto más pequeño */
    }

    .informacion-central {
        margin-top: 40%; 
        padding: 10px;
        height: calc(100vh - 80px);
    }

    .barra-busqueda{
        left: 50%;
    }
    

    .style-inv h1{
       display: none;
    }

    .formulario {
        position: relative;
        top: 12%;
        left: 4%;
        width: 80%;
        height: auto;
        margin: 50px auto;
        padding: 20px;
        background-color: #ffffff;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        border-radius: 12px;
    }

}


@media screen and (min-width: 1024px) {

    .btn-volver {
            position: absolute;      
            top: 95%;               
            left: 20px;             
            padding: 10px;
            background: red !important;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 16px;
            cursor: pointer;
            transition: background-color 0.3s ease;
            width: 20px;
    }

  .formulario {
    position: absolute;
    top: 30px;
    height: auto;
  }

  .formulario button{
    position: absolute;
    width: 20%;
    bottom: -30px;
    right: 0px;
  }

  .formulario label {
    font-size: 12px;
    
  }

  .formulario select{
    width: 30%;
  }

}