/* =========================
   AJUSTE RESPONSIVE MOVIL
========================= */

@media only screen and (max-width: 768px) {

    /* Navbar en columna */
    .navbar.navbar-default {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding-top: 15px !important;
        padding-bottom: 15px !important;
        height: auto !important;
    }

    /* Contenedor logo */
    .navbar-header {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        margin-bottom: 15px !important;
    }

    /* Logo */
    #navbarlogo,
    #navbarlogo-large,
    .navbar-brand img {
        display: block !important;
        max-width: 220px !important;
        height: auto !important;
        margin: 0 auto !important;
    }

    /* Menú debajo del logo */
    .navbar-collapse {
        width: 100% !important;
        text-align: center !important;
    }

    /* Items del menú */
    .navbar-nav {
        float: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .navbar-nav > li {
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 5px !important;
    }

}

/* =======================================================
   AJUSTES GENERALES
======================================================= */

/* Asegura que el tour siempre esté por encima del menú de PHPRunner */
.shepherd-element {
    z-index: 10000 !important;
}

/* =======================================================
   SCROLLBAR PERSONALIZADO
======================================================= */

.mCustomScrollBox.mCS-minimal-dark.mCSB_vertical.mCSB_outside {
    border-radius: 15px !important;
    overflow: hidden !important;
}

.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
    background-color: rgba(0, 0, 0, 0.2) !important;
    width: 8px !important;
    border-radius: 20px !important;
}

/* =======================================================
   NAVBAR / HEADER PRINCIPAL
======================================================= */

.navbar.navbar-default {
    border-radius: 15px !important;
    margin: 10px !important;
    border: none !important;
    background-color: #2c3e50 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;

    /* AJUSTE FINO */
    min-height: 60px !important;
    padding: 0px 15px !important;

    display: flex !important;
    align-items: center !important;
}

/* =======================================================
   CONTENEDOR LOGO
======================================================= */

.navbar-brand {
    height: 60px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding-top: 0px !important;
    padding-bottom: 0px !important;

    margin-top: -1px !important; /* SUBE EL LOGO */
}

/* =======================================================
   LOGO
======================================================= */

#navbarlogo {
    max-height: 46px !important;
    max-width: 240px !important;

    width: auto !important;
    height: auto !important;

    display: block !important;
    object-fit: contain !important;
}

/* =======================================================
   TEXTOS Y LINKS NAVBAR
======================================================= */

.navbar.navbar-default .navbar-nav > li > a,
.navbar.navbar-default .navbar-brand {
    color: #ffffff !important;
    text-shadow: none !important;

    display: flex !important;
    align-items: center !important;

    height: 60px !important;
}

/* Hover menú navbar */
.navbar.navbar-default .navbar-nav > li > a:hover {
    background-color: rgba(255,255,255,0.08) !important;
    transition: all 0.3s ease !important;
}

/* =======================================================
   MENÚ TREELIKE
======================================================= */

.r-menu.nav.menu-treelike li > a {
    position: relative;
    border-radius: 12px !important;
    margin: 4px 8px !important;
    transition: all 0.4s ease !important;
}

.r-menu.nav.menu-treelike li > a:hover {
    background-color: #f8f9fa !important;
    transform: translateX(8px);
    color: #007bff !important;
}

/* =======================================================
   TABLAS
======================================================= */

.r-horizontal-grid {
    border-collapse: separate !important;
    border-spacing: 0 6px !important;
    border: none !important;
    background: transparent !important;
}

/* =======================================================
   ENCABEZADOS TABLAS
======================================================= */

.r-horizontal-grid thead tr th {
    background-color: #34495e !important;
    color: #ffffff !important;

    padding: 15px 10px !important;
    border: none !important;

    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;

    text-align: center !important;
}

/* Bordes encabezado */
.r-horizontal-grid thead tr th:first-child {
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
}

.r-horizontal-grid thead tr th:last-child {
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
}

/* =======================================================
   FILAS TABLAS
======================================================= */

.r-horizontal-grid tbody tr.r-gridrow {
    transition: all 0.3s ease !important;
    background-color: #ffffff !important;
}

.r-horizontal-grid tbody tr.r-gridrow td {
    border-top: 1px solid #e0e0e0 !important;
    border-bottom: 1px solid #e0e0e0 !important;

    padding: 12px 10px !important;
    color: #444 !important;
}

/* Bordes filas */
.r-horizontal-grid tbody tr.r-gridrow td:first-child {
    border-top-left-radius: 10px !important;
    border-bottom-left-radius: 10px !important;
    border-left: 1px solid #e0e0e0 !important;
}

.r-horizontal-grid tbody tr.r-gridrow td:last-child {
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
    border-right: 1px solid #e0e0e0 !important;
}

/* =======================================================
   HOVER TABLAS
======================================================= */

.r-horizontal-grid tbody tr.r-gridrow:hover {
    transform: translateY(-2px);
    z-index: 10;
    position: relative;
}

.r-horizontal-grid tbody tr.r-gridrow:hover td {
    border-top-color: #007bff !important;
    border-bottom-color: #007bff !important;

    box-shadow: 0 6px 12px rgba(0,0,0,0.1) !important;
    background-color: #fdfdfd !important;
}

/* =======================================================
   LIMPIEZA TABLAS
======================================================= */

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #ffffff !important;
}