

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@700&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
}

body
{
	font-family: 'Poppins', sans-serif;
    background-color: #ffffff;
    flex: 1;
}

:root {
    --color-bg: #EBECF2;
    --color-surface: #FFFFFF;
    --color-border: #9A9EB2;
    --color-text-primary: #000;
    --color-text-secondary: #3F435D;
    --color-tooltip-bg: #2A2E33;
    --color-tooltip-text: #fff;
    --shadow-border: rgba(0, 0, 0, 0.1);
    --user-bg-color: #FAFAFC;
}

img
{
    max-width: 100%;
}

.header{
    background-image: url(../imagenes/bg.png);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    position: relative;
    min-height: 55vh;
    align-items: center;
}


.header-txt h1{
    font-size: 70px;
    line-height: 80px;
    font-weight: 700;
    text-transform: uppercase;
    color: #02457a;
    margin-bottom: 25px;
    margin-left: 70px;
    font-family: "Roboto", sans-serif;
}

.header-txt p{
    font-size: 18px;
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 25px;
}

.table {
    width: 90%;
    margin: 30px auto;
    background-color: #fff;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
	border-radius: 20px;
    margin-bottom: 80px;
}

.table__header {
    background-color: #02457a;
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;    
}

.table__header h2 {
    font-size: 30px;
    margin: 0;
	font-family: "Roboto", sans-serif;
}

.table__header .btn {
    background-color: #97CADB;
    border: none;
    font-weight: bold;
	border-radius: 15px;
    color: #001B48;
    font-family: "Roboto", sans-serif;
}

.table__header .btn:hover {
    background-color: #018ABE;
}

.table__body {
    padding: 20px;
    overflow-x: auto;
    font-family: 'Poppins', sans-serif;
    
}
table {
    width: 100%;
    border-collapse: collapse;
	
}

table th, table td {
    padding: 15px;
    text-align: left;
   
}

table th {
    background-color:#02457a;
    color: #fff;
    font-weight: bold;
	
}


table tr:hover {
    background-color: #f1f1f1;
}

.modal-header {
    background-color:#02457a;
    color: #fff;
}

.modal-footer .btn-primary {
    background-color: #02457a;
    border: none;
}

.modal-footer .btn-secondary {
    background-color: #6c7d6f;
    border: none;
}

.alert {
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
}


.filtros {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    margin: 20px 10px;
}

#buscador {
    width: 250px;   
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

#modulos {
    width: 180px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
}

img
{
    max-width: 100%;
}


.sidebar {
  position: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 15rem;
  height: 100%;
  padding: 1.4rem 1rem 0 1rem;
  background-color: var(--color-surface);
  box-shadow: 1px 0px 10px var(--shadow-border);
  transition: width 0.5s ease;
}
.sidebar.minimize{
    width: 4.94rem;
}
.sidebar.minimize .menu-btn{
    right: -2.2rem;
}
.sidebar.minimize .menu-btn i{
    transform: rotate(180deg);
}
.sidebar.minimize .search{
    box-shadow: none;
}

.menu-container{
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
}

.search{
    display: flex;
    width: 100%;
    padding: 0.55rem 0;
    margin-bottom: 1.2rem;
    border-radius: 0.3rem;
    box-shadow: 0 0 0 1px var(--color-border);
    cursor: pointer;
    transition: box-shadow 0.5s ease;
}
.search:hover{
    box-shadow: 0 0 0 1px var(--color-text-primary);
}
.search i {
    font-size: 1.35rem;
    color: var(--color-text-secondary);
    padding: 0 0.8rem;
}
.search:hover i {
    color: var(--color-text-primary);
}
    .search input {
    width: 70%;
    border: none;
    outline: none;
    background-color: transparent;
    color: var(--color-text-primary);
}

.header
{
    width: 100%;
}
/* Menu Button */
.menu-btn
{

    position: absolute;
    top: 3.5%;
    right: -0.87rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background-color: #fff;
    color: #757575;
    box-shadow: 2px 2px 5px var(--shadow-border);
    cursor: pointer;
    transition: right 0.3s ease;
} 

.menu-btn i
{
    font-size: 1,5rem;
}

.brand {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-left: 0.455rem;
  margin-bottom: 1.8rem;
  overflow: hidden;
}
.brand img
{
    width: 2rem;
}

.brand span {

  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-primary);
}


/* Menu */
.menu{
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.menu .menu-item{
  position: relative;
  list-style: none;
  overflow: hidden;
}

.menu .menu-link{
  display: flex;
  padding: 0.55rem 0;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: 0.3rem;
}

.menu-item:hover .menu-link,
.sub-menu .sub-menu-link:hover,
.sub-item.active .menu-link{
  color: var(--color-text-primary);
  background-color: var(--color-bg);
}

.menu-link i{
  font-size: 1.35rem;
  padding: 0 0.8rem;
}

.menu-link i:last-child{
  margin-left: auto;
  transition: transform 0.3s ease;
}

.menu-item.sub-menu-toggle .menu-link i:last-child{
  transform: rotate(180deg);
}
.menu-link span {
  font-size: 0.8rem;
  font-weight: 500;
}

.sidebar.minimize .menu-item:hover,
.sidebar.minimize .menu-item.menu-item.sub-menu-toggle
{
  overflow: visible;
}
.sidebar.minimize .menu-item:hover span,
.sidebar.minimize .menu-item.menu-item.sub-menu-toggle span{
  position: absolute;
  left: 4.2rem;
  padding: 0.5rem;
  background-color: var(--color-tooltip-bg);
  border-radius: 0.4rem;
  color: var(--color-tooltip-text);
  transition: all 0.3s ease;
}

/* Sub menu*/
.sub-menu{
    height: 0;
    transition: all 0.3s ease ;
    overflow: hidden;
}
.sidebar.minimize .sub-menu{
    position: absolute;
    left: 4.2rem;
    background-color: var(--color-surface);
    border-radius: 0.2rem;
}

.sidebar.minimize .menu-item.menu-item.sub-menu-toggle .sub-menu{
    margin-top: 0.5rem;
}

.sub-menu .sub-menu-link{
 
  display: flex;
  margin-left: 2.5rem;
  padding: 0.55rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: 0.3rem;
}

.sub-menu::before{
  content: '';
  position: absolute;
  height: 100%;
  width: 0.07rem;
  margin-left: 1.4rem;
  background-color: var(--color-border);
}
.sidebar.minimize .sub-menu::before{
    width: 0;
}

.sidebar.minimize .sub-menu a{
    margin:  0 0.5rem;
}

.sidebar-btn{
    display: none;
}

/* Main */
main {
  padding-left: 15rem; /* espacio solo para el sidebar */
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  margin: 0;
  transition: padding 0.5s ease;
  
}

.sidebar.minimize ~ main {
  padding-left: 5rem;
}


.header-txt {
  flex-basis: 30%;
  padding-right: 30px;

  /* 🔹 nuevo margen desde el lado izquierdo */
  margin-left: 2rem; /* puedes ajustar: 1rem = pequeño, 2rem = moderado */
}


.sidebar.minimize ~ main .header-txt {
  margin-left: 1rem; /* se reduce un poco al minimizar el menú */
}


/* Responsive */
@media (max-height: 683px) {
  .footer {
    box-shadow: none;
  }
  .footer ul {
    display: none;
  }
  .menu-container {
    overflow-y: auto;
  }
  .search {
    box-shadow: none;
    border: 2px solid var(--color-border);
  }
  .search:hover {
    box-shadow: none;
  }
  main
  {
    padding:2rem ;
  }
}

@media (max-width:700px) or (max-height:683px) {
  #menu-btn {
    display: none;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar-btn{
    display: flex;
    right: 1rem;
    padding: 1.2rem;
  }
  .sidebar-btn i:last-child
  {
    display: none;
  }
  body.sidebar-hidden .sidebar{
    transform: translateX(0);
  }
  body.sidebar-hidden .sidebar-btn i:last-child{
    display: flex;
  }
  body.sidebar-hidden .sidebar-btn i:first-child{
    display: none;
  }
  main{
    padding: 2rem;
  }
   }

   @media screen and (max-width:800px){
    .pie-pagina .grupo-1{
        width: 90%;
        grid-template-columns: repeat(1, 1fr);
        grid-gap:30px;
        padding: 35px 0px;
    }
}


/* 🔹 Corregir posición del menú y comportamiento del contenido */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000; /* asegura que quede encima cuando se despliegue */
}

