       * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            display: flex;
            min-height: 100vh;
            height: 100vh;
            margin: 0;
            padding: 0;
            overflow: hidden;
        }

        /* ── OVERLAY para móvil ── */
        .overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 90;
        }
        .overlay.show {
            display: block;
        }

        .sidebar {
            width: 280px;
            background: white;
            box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
            display: flex;
            flex-direction: column;
            padding: 30px 20px;
            overflow-y: auto;
            /* Para móvil: posición fija fuera de pantalla */
            position: relative;
            z-index: 100;
            flex-shrink: 0;
        }

        .logo-section {
            text-align: center;
            margin-bottom: 40px;
            padding-bottom: 30px;
            border-bottom: 2px solid #e0e0e0;
        }

        .logo {
            width: 110px;
            height: 110px;
            margin: 0 auto 20px;
        }

        .logo img {
            width: 90%;
            height: 90%;
        }

        .logo-section h1 {
            font-size: 32px;
            color: #333;
            margin-bottom: 8px;
            font-weight: bold;
        }

        .tagline {
            font-size: 16px;
            color: #666;
            font-style: italic;
        }

        .menu {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .menu-item {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 18px 22px;
            background: transparent;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 18px;
            color: #555;
            text-align: left;
            width: 100%;
        }

        .menu-item:hover {
            background: #f5f5f5;
            transform: translateX(5px);
        }

        .menu-item.active {
            background: linear-gradient(135deg, #916eac, #916eac);
            color: white;
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
        }

        .menu-item .icon {
            font-size: 26px;
        }

        .login-btn-small {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-top: 20px;
            padding: 7px 14px;
            background: #916eac;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 13px;
            color: white;
            font-weight: 500;
            box-shadow: 0 2px 8px rgba(145,110,172,0.3);
        }

        .login-btn-small:hover {
            background: #7d5a97;
            transform: translateY(-1px);
        }

        /* ── TOPBAR móvil con botón hamburguesa ── */
        .topbar-mobile {
            display: none;
            background: white;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            height: 56px;
            align-items: center;
            padding: 0 16px;
            gap: 14px;
            flex-shrink: 0;
            z-index: 80;
        }

        .hamburger {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #333;
            padding: 4px;
        }

        .topbar-mobile-title {
            font-size: 18px;
            font-weight: 700;
            color: #333;
        }

        .main-content {
            flex: 1;
            height: 100vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        .content-frame {
            width: 100%;
            flex: 1;
            overflow: hidden;
        }

        .loading {
            text-align: center;
            padding: 60px;
            font-size: 22px;
            color: #666;
        }

        .content-frame iframe {
            width: 100%;
            height: 100%;
            border: none;
            border-radius: 0;
            display: block;
        }

        /* LOGIN MODAL */
        .login-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(5px);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .login-modal.active {
            display: flex;
        }

        .login-box {
            background: white;
            border-radius: 20px;
            padding: 50px;
            width: 90%;
            max-width: 450px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: slideDown 0.4s ease-out;
        }

        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-50px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        .login-box h2 {
            color: #081e54;
            font-size: 32px;
            margin-bottom: 10px;
            text-align: center;
        }

        .login-box p {
            color: #666;
            text-align: center;
            margin-bottom: 30px;
            font-size: 16px;
        }

        .form-group {
            margin-bottom: 25px;
        }

        .form-group label {
            display: block;
            color: #081e54;
            font-weight: 600;
            margin-bottom: 10px;
            font-size: 16px;
        }

        .form-group input {
            width: 100%;
            padding: 15px;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            font-size: 16px;
            transition: all 0.3s;
        }

        .form-group input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .login-submit {
            width: 100%;
            padding: 18px;
            background: linear-gradient(135deg, #081e54, #667eea);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            margin-bottom: 15px;
        }

        .login-submit:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(8, 30, 84, 0.4);
        }

        .login-cancel {
            width: 100%;
            padding: 18px;
            background: #f5f5f5;
            color: #666;
            border: none;
            border-radius: 12px;
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }

        .login-cancel:hover {
            background: #e0e0e0;
        }

        .error-message {
            background: #fee;
            color: #c33;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 20px;
            text-align: center;
            font-weight: 600;
            display: none;
        }

        .error-message.show {
            display: block;
            animation: shake 0.5s;
        }

        @keyframes shake {
            0%,  100% { transform: translateX(0); }
            25%        { transform: translateX(-10px); }
            75%        { transform: translateX(10px); }
        }

        /* ── RESPONSIVE MÓVIL ── */
        @media (max-width: 768px) {
            body {
                flex-direction: column;
                overflow: hidden;
            }

            /* La topbar aparece en móvil */
            .topbar-mobile {
                display: flex;
            }

            /* El sidebar se convierte en drawer deslizable */
            .sidebar {
            position: fixed;
            top: 0;
            left: 0;
            height: 100vh;
            width: 280px;
            transform: translateX(-100%);
            transition: transform 0.3s ease;
            z-index: 100;
            overflow-y: auto; /* 👈 agrega solo esta línea */
            }

            .sidebar.open {
                transform: translateX(0);
            }

            /* El contenido ocupa toda la pantalla */
            .main-content {
                height: 100vh;
                width: 100%;
            }

            .content-frame {
                height: calc(100vh - 56px);
            }

            .login-box {
                padding: 30px;
                margin: 20px;
            }
        }
