/* ===== RESETEAR Y FORZAR FONT AWESOME ===== */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

/* Forzar la fuente en todos los �conos */
i[class*="fa-"] {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Regular', 'Font Awesome 5 Free', 'FontAwesome' !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Espec�ficamente para tu �cono */
.user-info i.fa-regular,
.user-info i.fa-id-badge {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Regular' !important;
    font-weight: 400 !important;
    font-size: 32px !important;
    color: #f56565 !important;
    display: inline-block !important;
    line-height: 1 !important;
}

/* Versi�n s�lida por si acaso */
.user-info i.fas,
.user-info i.fa-solid {
    font-weight: 900 !important;
}

/* ===== VARIABLES ===== */
:root {
    --azul-oscuro: #1C2A43;
    --azul-claro: #2a3a5a;
    --azul-medio: #2c5282;
    --azul-claro-br: #4299e1;
    --azul-gradiente: linear-gradient(135deg, #1a365d, #2c5282);
    --rojo-oscuro: #E23935;
    --rojo-medio: #f56565;
    --rojo-tenue: #fc8181;
    --rojo-gradiente: linear-gradient(135deg, #c53030, #f56565);
    --blanco: #ffffff;
    --gris-claro: #f7fafc;
    --gris-medio: #e2e8f0;
    --gris-oscuro: #cbd5e0;
    --gris-border: #dee2e6;
    --texto-oscuro: #212529;
    --texto-gris: #6c757d;
    --sombra-fuerte: 0 10px 25px rgba(0, 0, 0, 0.2);
    --sombra-suave: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ===== TIPOGRAF�A BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lucida Sans Unicode', 'Lucida Grande', Helvetica, Arial, sans-serif;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f0f2f5;
    font-size: 12px;
    color: #333;
}

/* ===== HEADER PRINCIPAL ===== */
#header-container {
    width: 100%;
    background: var(--azul-oscuro);
    /*border-bottom: 4px solid var(--rojo-oscuro);*/
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo img {
    max-height: 60px;
    width: auto;
}

/* ===== REDES SOCIALES ===== */
.social-links {
    display: flex;
    gap: 25px;
}

.social-links a {
    color: white;
    font-size: 18px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.social-links a:hover {
    color: var(--rojo-medio);
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* ===== USUARIO ===== */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 15px;
    font-family: Verdana, Geneva, sans-serif;
}

.user-info i.fa-regular,
.user-info i.fa-id-badge,
.user-info i.bi {
    color: var(--rojo-medio);
    font-size: 32px !important;
    width: 40px;
    height: 40px;
    display: inline-block;
    text-align: center;
    line-height: 40px;
}

.user-info .name {
    color: white;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    font-family: Verdana, Geneva, sans-serif;
}

.user-info .profile {
    color: var(--rojo-medio);
    font-size: 12px;
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 20px;
    font-family: Verdana, Geneva, sans-serif;
}

.user-info .logout-btn {
    background: var(--rojo-oscuro);
    color: white;
    border: 1px solid white;
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 12px;
    text-decoration: none;
    margin-left: 10px;
    transition: all 0.3s;
    font-family: Verdana, Geneva, sans-serif;
}

.user-info .logout-btn:hover {
    background: #b91c1c;
}

/* ===== HEADER BOTTOM Y MEN� ===== */
.header-bottom {
    background: var(--azul-oscuro);
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative;
    width: 100%;
}

.menu-wrapper {
    max-width: 100% !important;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 60px;
    width: 100%;
    border-bottom: 4px solid var(--rojo-oscuro);
}

#menu {
    flex: 1;
    width: 100%;
}

ul.menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 60px;
    width: 100%;
    justify-content: flex-start;
}

ul.menu > li {
    position: static !important;
    height: 60px;
    flex: 0 1 auto;
    margin: 0;
    padding: 0;
}

/* ===== NIVEL 1 - MEN� PRINCIPAL ===== */
ul.menu > li > a {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 20px;
    color: white;
    text-decoration: none;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    gap: 12px;
    border-right: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
    transition: background 0.3s;
    cursor: pointer;
    font-family: 'Lucida Sans Unicode', 'Lucida Grande', Helvetica, Arial, sans-serif;
}

ul.menu > li > a i {
    color: var(--rojo-oscuro);
    font-size: 14px;
    width: 22px;
    text-align: center;
}

ul.menu > li > a:hover {
    background: rgba(255,255,255,0.15);
}

ul.menu > li > a.active {
    background: var(--rojo-gradiente);
}

ul.menu > li > a.active i {
    color: white;
}

.menu-arrow {
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
}

.menu-arrow i {
    font-size: 10px;
    color: white;
    transition: transform 0.3s;
}

ul.menu > li > a .menu-arrow i:before {
    content: "\f078" !important;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

ul.menu > li > a.active .menu-arrow i:before {
    content: "\f077" !important;
}

/* ===== ITEM SALIR ===== */
ul.menu > li.menu-item-salir {
    display: none !important;
}

/* ===== SUBMEN� NIVEL 2 ===== */
.submenu-nivel2 {
    display: none;
    position: absolute;
    top: 55px;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--blanco);
    border-top: 4px solid var(--rojo-medio);
    box-shadow: var(--sombra-fuerte);
    padding: 25px 0;
    z-index: 2000;
}

.grid-nivel2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.tarjeta-nivel2 {
    background: var(--gris-claro);
    border-left: 5px solid var(--azul-claro-br);
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--sombra-suave);
    border: 1px solid var(--gris-medio);
    transition: all 0.3s;
}

.tarjeta-nivel2:hover {
    transform: translateY(-3px);
    box-shadow: var(--sombra-fuerte);
}

.nivel2-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--azul-oscuro);
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gris-medio);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Lucida Sans Unicode', 'Lucida Grande', Helvetica, Arial, sans-serif;
}

.nivel2-link i {
    color: var(--azul-claro-br);
    margin-right: 8px;
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.nivel2-link .menu-arrow i {
    font-size: 12px;
    color: var(--azul-oscuro);
}

.nivel2-link .menu-arrow i:before {
    content: "\f067" !important;
}

.nivel2-link.active .menu-arrow i:before {
    content: "\f068" !important;
}

.nivel2-link.active {
    color: var(--rojo-medio);
    border-bottom-color: var(--rojo-medio);
}

.nivel2-link.active i,
.nivel2-link.active .menu-arrow i {
    color: var(--rojo-medio);
}

/* ===== SUBMEN� NIVEL 3 ===== */
.submenu-nivel3 {
    display: none;
    margin-top: 10px;
    padding-left: 12px;
    border-left: 2px dashed var(--gris-medio);
}

.submenu-nivel3 ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.submenu-nivel3 ul li {
    margin: 2px 0;
}

.submenu-nivel3 ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    color: var(--texto-gris);
    text-decoration: none;
    font-size: 11px;
    border-radius: 4px;
    transition: all 0.2s;
    font-family: 'Lucida Sans Unicode', 'Lucida Grande', Helvetica, Arial, sans-serif;
}

.submenu-nivel3 ul li a i {
    color: var(--azul-claro-br);
    font-size: 11px;
    width: 16px;
    text-align: center;
}

.submenu-nivel3 ul li a:hover {
    background: rgba(66, 153, 225, 0.1);
    color: var(--azul-oscuro);
    padding-left: 15px;
}

.submenu-nivel3 ul li a:hover i {
    color: var(--azul-oscuro);
}

.submenu-nivel3 ul li a.active {
    background: rgba(66, 153, 225, 0.15);
    color: var(--rojo-medio);
    font-weight: bold;
    border-left: 3px solid var(--rojo-medio);
}

/* ===== BOT�N HAMBURGUESA ===== */
.hamburger-btn {
    display: none;
    background: #c53030;
    border: none;
    color: white;
    font-size: 20px;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.hamburger-btn:hover {
    background: #b91c1c;
    transform: scale(1.05);
}

/* ===== OVERLAY ===== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1999;
    cursor: pointer;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.mobile-overlay.active {
    display: block !important;
}

/* ===== BOT�N CERRAR FLOTANTE ===== */
.mobile-close-floating {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: #c53030;
    color: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2002;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    border: 2px solid white;
    transition: all 0.3s ease;
}

.mobile-close-floating i {
    font-size: 24px;
}

.mobile-close-floating:hover {
    transform: scale(1.1) rotate(90deg);
    background: #b91c1c;
}

/* ===== CONTENIDO PRINCIPAL ===== */
.main-content-wrapper {
    flex: 1 0 auto;
    width: 100%;
    background: #f0f2f5;
    padding: 20px 0;
}

.content-area {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* ===== FOOTER ===== */
#footer-internal {
    background: var(--azul-oscuro);
    color: white;
    padding: 20px;
    text-align: center;
    border-top: 4px solid var(--rojo-oscuro);
    width: 100%;
    flex-shrink: 0;
}

/* ===== RESPONSIVE 13 PULGADAS ===== */
@media (min-width: 1025px) and (max-width: 1366px) {
    ul.menu > li > a {
        padding: 0 10px;
        font-size: 10px;
        gap: 5px;
    }
    
    ul.menu > li > a i {
        font-size: 12px;
    }
    
    .logo img {
        max-height: 50px;
    }
    
    .social-links {
        gap: 15px;
    }
    
    .social-links a {
        font-size: 16px;
        width: 28px;
        height: 28px;
    }
    
    .user-info {
        padding: 4px 12px;
    }
    
    .user-info .name {
        font-size: 11px;
    }
    
    .user-info .profile {
        font-size: 10px;
    }
}

/* ===== RESPONSIVE M�VIL ===== */
@media (max-width: 1024px) {
    .header-top {
        flex-direction: column;
        padding: 10px 15px;
        gap: 12px;
        position: relative;
    }
    
    .logo {
        order: 1;
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .social-links {
        order: 2;
        width: 100%;
        justify-content: center;
        gap: 15px;
    }
    
    /* Estilos para user-info en m�vil - centrado y con bot�n abajo */
    .user-info {
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 12px 15px;
        background: rgba(255,255,255,0.08);
        border-radius: 16px;
        margin-top: 5px;
    }
    
    .user-info i {
        font-size: 32px !important;
        margin-bottom: 5px;
    }
    
    .user-info .user-details {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        width: 100%;
    }
    
    .user-info .name {
        font-size: 14px !important;
        font-weight: bold;
        text-align: center;
        display: block;
        width: 100%;
    }
    
    .user-info .profile {
        font-size: 11px !important;
        padding: 4px 12px;
        background: rgba(252, 129, 129, 0.2);
        border-radius: 20px;
        display: inline-block;
        text-align: center;
    }
    
    .user-info .logout-btn {
        margin-top: 5px;
        padding: 8px 20px;
        font-size: 12px;
        width: auto;
        min-width: 120px;
        text-align: center;
        display: inline-block;
    }
    
    .menu-wrapper {
        padding: 0 15px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        position: relative;
        min-height: 55px;
        border-bottom: none;
    }

    .hamburger-btn {
        display: flex;
        margin: 0;
        position: relative;
        left: 0;
        z-index: 20;
    }
    
    #menu {
        display: none;
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: #1C2A43;
        z-index: 2001;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding: 20px 0;
    }
    
    #menu.mobile-open {
        display: block;
        left: 0;
    }
    
    ul.menu {
        flex-direction: column;
        height: auto;
    }
    
    ul.menu > li {
        height: auto;
        width: 100%;
    }
    
    ul.menu > li > a.parent {
        height: auto;
        padding: 15px 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        justify-content: space-between;
    }
    
    .submenu-nivel2 {
        position: relative;
        top: 0;
        padding: 10px 15px;
        margin-top: 0 !important;
    }
    
    .grid-nivel2 {
        grid-template-columns: 1fr;
        padding: 0;
    }
    
    .mobile-close-floating.active {
        display: flex !important;
    }
}

@media (min-width: 1025px) {
    .hamburger-btn {
        display: none !important;
    }
    
    #menu {
        display: block !important;
    }
}

/* ===== ESTILOS PARA HACER M�S GRANDES LA TIPOGRAF�A Y EL LOGO ===== */
.logo img {
    max-height: 70px !important;
    width: auto;
}

.user-info .name {
    font-size: 16px !important;
    font-weight: bold;
}

.user-info .profile {
    font-size: 13px !important;
    padding: 4px 10px;
}

.user-info i {
    font-size: 36px !important;
}

ul.menu > li > a.parent {
    font-size: 13px !important;
    padding: 0 25px !important;
}

ul.menu > li > a.parent i {
    font-size: 16px !important;
}

.nivel2-link {
    font-size: 14px !important;
}

.submenu-nivel3 ul li a {
    font-size: 12px !important;
}

@media (min-width: 1200px) and (max-width: 1440px) {
    .logo img {
        max-height: 60px !important;
    }
    
    ul.menu > li > a.parent {
        font-size: 12px !important;
        padding: 0 20px !important;
    }
    
    .user-info .name {
        font-size: 14px !important;
    }
}

@media (max-width: 1024px) {
    .logo img {
        max-height: 60px !important;
    }
    
    ul.menu > li > a.parent {
        font-size: 14px !important;
        padding: 12px 20px !important;
    }
    
    .user-info .name {
        font-size: 16px !important;
    }
    
    body {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    .header-bottom {
        margin-top: 0 !important;
    }
    
    .menu-wrapper {
        margin-top: 0 !important;
    }
}

.title{
    height: 55px;
}

#search{
    height: 30px;
}

#search-options{
    height: 170px;
    background:var(--gris-border)
}

#btn-export{
    height: 30px;
}

.wrapper{
    width: 1200px;
}

#btn-search{
    height: 28px;
}

a.submit-button{
    height: 33px;
    font-weight: bold;
}

#search-box {
  text-align: left;
  background: #D6D6D6;
  padding-top: 15px;
  padding-bottom: 25px;
  padding-left: 25px;
  font-size: 14px;
  min-height: 100px;
  box-sizing: border-box;
}

#btn-save-1 {
  height: 30px;
}

#upload-instructions {
  background: #DCDCDC;
}

.link-user-option {
  height: 60px;
}

/* ===== FORZAR BORDES EN MEN� DESKTOP ===== */
@media (min-width: 1025px) {
    /* Borde inferior en nivel 2 */
    .nivel2-link {
        border-bottom: 2px solid var(--gris-medio) !important;
        margin-bottom: 12px !important;
        padding-bottom: 10px !important;
    }
    
    /* Borde inferior rojo cuando est� activo */
    .nivel2-link.active {
        border-bottom-color: var(--rojo-medio) !important;
    }
    
    /* L�nea punteada en nivel 3 */
    .submenu-nivel3 {
        border-left: 2px dashed var(--gris-medio) !important;
        margin-top: 12px !important;
        margin-bottom: 8px !important;
        padding-left: 15px !important;
    }
    
    /* Asegurar que los items del nivel 3 tengan espaciado */
    .submenu-nivel3 ul li {
        margin: 6px 0 !important;
    }
    
    /* Hover del nivel 2 - borde rojo */
    .nivel2-link:hover {
        border-bottom-color: var(--rojo-medio) !important;
    }
}