/* ==========================================================================
   APPPET - CSS GLOBAL DE LA RAÍZ (LIMPIO Y SEGURO)
   ========================================================================== */

:root {
    --bg-gradient: linear-gradient(135deg, #5147e5 0%, #271f80 100%);
    --glass-bg: rgba(25, 21, 68, 0.85);
    --glass-border: rgba(0, 188, 212, 0.3);
    --accent-color: #00bcd4;
    --accent-hover: #4dd0e1;
    --text-color: #ffffff;
}

body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--accent-hover);
}

/* Reemplazo del logo gráfico en la raíz */
.sidebar .logo_content .logo img,
nav .navbar-brand img {
    display: none !important;
}

.sidebar .logo_content .logo::after,
nav .navbar-brand::after {
    content: "appPet";
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-color) !important;
    letter-spacing: -0.5px;
    display: inline-block;
    white-space: nowrap;
}

/* Sidebar de la raíz */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0; 
    width: 78px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-right: 1px solid var(--glass-border);
    padding: 6px 14px;
    z-index: 9999;
    transition: all 0.5s ease;
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch;
}

.sidebar.active { width: 250px; }
.sidebar .logo_content { display: flex; align-items: center; position: relative; width: 100%; height: 60px; }
.sidebar .logo_content .logo { display: flex; align-items: center; gap: 12px; padding-left: 2px; }

.sidebar #btn {
    position: absolute; color: #ffffff; left: 50%; top: 50%; transform: translate(-50%, -50%);
    font-size: 22px; cursor: pointer; transition: all 0.3s ease;
}
.sidebar.active #btn { left: 90%; }

.sidebar ul { margin-top: 20px; padding-left: 0; list-style: none; }
.sidebar ul li { position: relative; height: 50px; width: 100%; margin: 5px 0; line-height: 50px; }
.sidebar ul li a { color: #ffffff; display: flex; align-items: center; text-decoration: none; transition: all 0.4s ease; border-radius: 10px; white-space: nowrap; }
.sidebar ul li a:hover { background: rgba(0, 188, 212, 0.15); color: var(--accent-color); }
.sidebar ul li a i { height: 50px; min-width: 50px; border-radius: 12px; line-height: 50px; text-align: center; font-size: 18px; }
.sidebar .links_name { opacity: 0; pointer-events: none; transition: all 0.3s ease; }
.sidebar.active .links_name { opacity: 1; pointer-events: auto; }

/* Contenedor principal de la raíz */
.home_content {
    position: absolute;
    height: 100%;
    left: 78px;
    width: calc(100% - 78px);
    transition: all 0.5s ease;
    background: transparent;
}
.sidebar.active ~ .home_content { left: 250px; width: calc(100% - 250px); }
.home_content iframe { height: 100%; width: 100%; border: none; background: transparent; }

/* Modales y elementos globales de la raíz */
.modal-dialog, #feedback, #confirm {
    max-width: 500px !important;
    margin: 5% auto !important; 
}
.modal-content, #feedback, #confirm {
    box-sizing: border-box !important;
    background: rgba(25, 21, 68, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border) !important;
    border-radius: 16px !important;
    padding: 30px !important;
    color: #ffffff;
}
.modal-content h1, .modal-content h2, .modal-content h3, .modal-content h4, 
#feedback h3, #confirm h3 { 
    color: var(--accent-color); 
    margin-top: 0; 
    font-family: 'Montserrat', sans-serif; 
}

@media (max-width: 768px) {
    .sidebar { width: 0px; padding: 0; }
    .sidebar.active { width: 240px; padding: 6px 14px; }
    .home_content { left: 0 !important; width: 100% !important; }
    .sidebar.active ~ .home_content { opacity: 0.3; pointer-events: none; }
/* Forzar ancho completo en menús desplegables en móviles */
    ..dhx_combo_list {
        position: fixed !important;
        top: auto !important;
        left: 15px !important;
        right: 15px !important;
        width: auto !important;
        max-width: none !important;
        max-height: 200px !important;
        overflow-y: auto !important;
        z-index: 999999 !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    }
}

/* Ocultar globalmente el botón Back to Top generado por la plantilla */
.back-to-top {
    display: none !important;
}