/* === VARIABLES CORPORATIVAS === */
        :root {
            --primary-burgundy: #7d2d3d;        /* Borgoña principal del logo */
            --secondary-cream: #f8f6f4;         /* Blanco crema del logo */
            --accent-blue-gray: #8b9bb0;        /* Gris azulado del logo */
            --dark-burgundy: #5a1f29;           /* Borgoña oscuro */
            --light-cream: #fefcfa;             /* Crema muy claro */
            --warm-gold: #d4a574;               /* Dorado cálido (reemplazo del naranja) */
            --success-green: #6b8e5a;           /* Verde armonioso */
            --danger-rose: #c44569;             /* Rosa peligro */
        }

        /* === GENERAL === */
        body, html {
            height: 100%;
            margin: 0;
            font-family: 'Segoe UI', sans-serif;
        }

        .page-wrapper {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        .main-content {
            flex-grow: 1;
            padding: 2rem;
            margin-left: 320px;
            transition: margin-left 0.3s ease;
        }

        @media (max-width: 768px) {
            .main-content {
                margin-left: 0 !important;
            }
        }

        /* === HEADER === */
        .sst-header {
            background: linear-gradient(135deg, var(--primary-burgundy), var(--dark-burgundy));
            color: white;
            box-shadow: 0 2px 8px rgba(125, 45, 61, 0.2);
            border-bottom: 4px solid var(--warm-gold);
            font-family: 'Segoe UI', sans-serif;
            padding: 0.5rem 1rem;
        }

        .sst-header .header-title {
            font-size: 1.6rem;
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .sst-header .user-info {
            font-size: 0.85rem;
            line-height: 1.2;
            color: white;
            white-space: nowrap;
        }

        #logoutBtn {
            background: transparent;
            border: 1px solid white;
            color: white;
            padding: 5px 12px;
            border-radius: 5px;
            font-size: 0.85rem;
            transition: all 0.3s ease;
        }

        #logoutBtn:hover {
            background-color: rgba(255, 255, 255, 0.2);
            border-color: var(--warm-gold);
        }

        @media (max-width: 768px) {
            .sst-header {
                flex-direction: column;
                align-items: flex-start;
            }

            .sst-header .d-flex {
                flex-direction: column;
                align-items: flex-start !important;
                gap: 0.5rem;
            }

            .sst-header .user-info {
                text-align: left;
            }
        }

        /* === FOOTER === */
        .sst-footer {
            background: linear-gradient(135deg, var(--primary-burgundy), var(--dark-burgundy));
            color: #ffffff;
            font-size: 0.9rem;
            padding: 1rem 1.5rem;
            text-align: center;
            border-top: 4px solid var(--warm-gold);
            box-shadow: 0 -2px 8px rgba(125, 45, 61, 0.2);
            margin-top: auto;
        }

        .sst-footer small {
            letter-spacing: 0.5px;
            font-weight: 400;
        }

        .sst-footer small::first-letter {
            color: var(--warm-gold);
            text-shadow: 0 0 6px rgba(212, 165, 116, 0.8);
            font-weight: 600;
        }

        @media (max-width: 576px) {
            .sst-footer {
                font-size: 0.8rem;
                padding: 1rem;
            }
        }

        /* === SIDEBAR UNIVERSAL === */
        #sidebarLeft {
            position: fixed;
            top: 56px;
            left: 0;
            width: 320px;
            height: calc(100vh - 56px);
            background-color: var(--secondary-cream);
            border-right: 1px solid #d4c9c1;
            overflow-y: auto;
            z-index: 1030;
            transition: transform 0.3s ease-in-out;
            padding-bottom: 2rem;
        }

        /* === Versión de escritorio (hover) === */
        @media (min-width: 769px) {
            #sidebarLeft {
                transform: translateX(-300px); /* Oculto por defecto */
            }

            #sidebarLeft:hover {
                transform: translateX(0); /* Aparece al hacer hover */
            }

            #sidebarLeft:hover ~ .main-content {
                margin-left: 320px;
            }

            .main-content {
                margin-left: 20px;
                transition: margin-left 0.3s ease;
            }
        }

        /* === Versión móvil (hamburguesa) === */
        @media (max-width: 768px) {
            #sidebarLeft {
                transform: translateX(-100%);
                width: 90vw;
                box-shadow: 0 0 15px rgba(125, 45, 61, 0.3);
            }

            #sidebarLeft.show {
                transform: translateX(0);
            }

            .main-content {
                margin-left: 0 !important;
            }
        }

        /* === BOTONES CORPORATIVOS === */
        .btn-sst {
            background: linear-gradient(135deg, var(--warm-gold), #e6b885);
            color: var(--primary-burgundy);
            font-weight: 600;
            border: none;
            border-radius: 6px;
            font-family: 'Segoe UI', sans-serif;
            box-shadow: 0 3px 6px rgba(125, 45, 61, 0.15);
            transition: all 0.3s ease;
        }

        .btn-sst:hover {
            background: linear-gradient(135deg, #e6b885, var(--warm-gold));
            color: var(--dark-burgundy);
            box-shadow: 0 4px 8px rgba(125, 45, 61, 0.25);
            transform: translateY(-1px);
        }

        .btn-sst i {
            margin-right: 6px;
        }

        /* === COLORES PERSONALIZADOS PARA BOTONES DE MÓDULOS === */
        .btn-recursos {
            background: linear-gradient(135deg, #e8ddd6, #d4c9c1);
            color: var(--dark-burgundy);
            border: 1px solid #c4b5aa;
        }
        .btn-integral {
            background: linear-gradient(135deg, #faf7e8, #f0ead0);
            color: var(--dark-burgundy);
            border: 1px solid #e6ddb3;
        }
        .btn-salud {
            background: linear-gradient(135deg, #d1e3f0, var(--accent-blue-gray));
            color: white;
            border: 1px solid #7a8fa5;
        }
        .btn-peligros {
            background: linear-gradient(135deg, #f5e6d3, var(--warm-gold));
            color: var(--dark-burgundy);
            border: 1px solid #c99a5a;
        }
        .btn-amenazas {
            background: linear-gradient(135deg, #f0d1d6, var(--danger-rose));
            color: white;
            border: 1px solid #a03952;
        }
        .btn-verificacion {
            background: linear-gradient(135deg, #e5e5e5, #d0d0d0);
            color: var(--dark-burgundy);
            border: 1px solid #b5b5b5;
        }
        .btn-mejoramiento {
            background: linear-gradient(135deg, #d8e8d9, var(--success-green));
            color: white;
            border: 1px solid #5a7a4a;
        }

        /* Mejora visibilidad cuando se colapsa */
        .accordion-button:not(.collapsed) {
            color: var(--dark-burgundy);
            background-color: var(--secondary-cream);
            box-shadow: inset 0 -1px 0 rgba(125, 45, 61, 0.125);
        }

        /* Ajustar texto para accesibilidad */
        .accordion-button {
            font-weight: 600;
            color: var(--primary-burgundy);
        }

        .accordion-button:focus {
            box-shadow: 0 0 0 0.25rem rgba(125, 45, 61, 0.25);
            border-color: var(--primary-burgundy);
        }

        /* === LOGIN PAGE STYLES === */
        body.login-page, html.login-page {
            height: 100%;
            background: linear-gradient(135deg, var(--primary-burgundy), var(--dark-burgundy));
            font-family: 'Segoe UI', sans-serif;
        }

        .login-wrapper {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            padding: 1rem;
        }

        .login-card {
            background-color: var(--light-cream);
            border-radius: 16px;
            box-shadow: 0 6px 18px rgba(125, 45, 61, 0.2);
            padding: 2rem;
            animation: fadeIn 0.5s ease-in-out;
            width: 100%;
            max-width: 480px;
            border: 1px solid rgba(125, 45, 61, 0.1);
        }

        .login-title {
            color: var(--primary-burgundy);
            font-weight: 600;
            margin-bottom: 1.5rem;
            text-align: center;
        }

        .login-logo {
            display: block;
            margin: 0 auto 1.5rem auto;
            max-width: 240px;
            height: auto;
        }

        .form-control:focus {
            box-shadow: 0 0 0 0.2rem rgba(125, 45, 61, 0.25);
            border-color: var(--primary-burgundy);
        }

        .input-group-text {
            background: linear-gradient(135deg, var(--warm-gold), #e6b885);
            color: var(--primary-burgundy);
            border: 1px solid var(--warm-gold);
        }

        .show-password {
            cursor: pointer;
        }

        @keyframes fadeIn {
            from {opacity: 0; transform: translateY(20px);}
            to {opacity: 1; transform: translateY(0);}
        }

        /* RESPONSIVE LOGIN */
        @media (max-width: 576px) {
            .login-card {
                padding: 1.5rem;
            }

            .login-logo {
                max-width: 180px;
                margin-bottom: 1rem;
            }
        }

        .cursor-pointer {
            cursor: pointer;
        }

        /* === ELEMENTOS DE DEMOSTRACIÓN === */
        .demo-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem;
        }

        .color-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1rem;
            margin: 2rem 0;
        }

        .color-card {
            padding: 1.5rem;
            border-radius: 10px;
            text-align: center;
            color: white;
            font-weight: 600;
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        }

        .color-primary { background: var(--primary-burgundy); }
        .color-secondary { background: var(--secondary-cream); color: var(--primary-burgundy); }
        .color-accent { background: var(--accent-blue-gray); }
        .color-gold { background: var(--warm-gold); color: var(--primary-burgundy); }

        .component-showcase {
            background: var(--light-cream);
            padding: 2rem;
            border-radius: 10px;
            margin: 2rem 0;
            box-shadow: 0 4px 10px rgba(125, 45, 61, 0.1);
        }

        .button-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin: 1rem 0;
        }

        .demo-button {
            padding: 0.75rem 1rem;
            border-radius: 6px;
            font-weight: 600;
            border: none;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .demo-sidebar {
            background: var(--secondary-cream);
            border: 1px solid #d4c9c1;
            border-radius: 10px;
            padding: 1rem;
            margin: 1rem 0;
        }

        .demo-header {
            background: linear-gradient(135deg, var(--primary-burgundy), var(--dark-burgundy));
            color: white;
            padding: 1rem;
            border-radius: 10px;
            margin: 1rem 0;
            border-bottom: 4px solid var(--warm-gold);
        }


        /* === MENÚ LATERAL: BOTONES DE MÓDULO (estado normal/activo) === */
#sidebarLeft .modulo-btn{
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  color: #333;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-weight: 600;
  padding: .6rem .8rem;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

#sidebarLeft .modulo-btn:hover,
#sidebarLeft .modulo-btn:focus{
  border-color: var(--primary-burgundy);
  box-shadow: 0 0 0 .15rem rgba(125,45,61,.15);
}

/* Activo (seleccionado) */
#sidebarLeft .modulo-btn.active{
  background: var(--primary-burgundy) !important;
  color: #fff !important;
  border-color: var(--primary-burgundy) !important;
}

#sidebarLeft .modulo-btn.active:hover,
#sidebarLeft .modulo-btn.active:focus{
  background: var(--dark-burgundy) !important;
  border-color: var(--dark-burgundy) !important;
  box-shadow: 0 0 0 .2rem rgba(90,31,41,.25);
}
